Creep upgrading for computer player

  • Thread starter Thread starter Amfidamant
  • Start date Start date
A

Amfidamant

Guest
I was makin a map, when i encountered 2 problems i couldnt solve. I made a building that spawns (using create unit at region) a few units and they go do what they have to for computer player 1 RED. Now, i also made upgrades for units.
Problem is, that i cannot upgrade the units.
First i was using this code
Code:
Event - Every 300 seconds of game time
Condinion - N/A
Action - order barracks 0000 <gen> to research Iron forget swords
I added the iron forged swords to barracks techree- researches available, also added units to units trained. But units dont upgrade.

Next problem is about spawning more units.
First i thought to make my unit barracks have research available and just added select unit and shop sharing to barracks abilities, but it didnt work. Then i made it sell an item called Horse breeding. What item does, is that it casts ability "item horse breeding".
To it i made a trigger
Code:
Event - Unit- a unit begins casting ability
Conditions - (ability being cast) equal to item Horse Breeding
Actions- if (all conditions are true) then do (Then - actions) else do (Else -actions)
 if - conditions
   (reseaqrched tech type) not equal to Horse breeding
 then-actions
   Unit-Order Barracks 0000 <gen> to research Horse breeding
 else-actions
   do nothing
This code was supposed to research upgrade Horse breeding (based on animal war training with 0 values set) and using this code
Code:
Event - Time- every 40 seconds of game
Conditions - N/A
Actions- if (all conditions are true) then do (Then - actions) else do (Else -actions)
  if - conditions
   (reseaqrched tech type) equal to Horse breeding
  then-actions
   Unit-Create 2 Knight for player 1(red) at (point (my point)) facing defauld building degrees
  Else-Actions
   Do nothing
Create 2 knight at position of my choice.
But in any way, it doesnt work at all.

I hope i explained everything clearly.
Thanks, Amfi
 
You don't really need a computer player to actually research the upgrade.
Simply add 1 to the current research level.
Under "Player" is an action that can set the level of "tech".


For your Horse Breeding... no idea.
Maybe with some more details about what exactly is supposed to happen?

What's sure, however, is that a trigger waiting for an ability or for passed time
doesn't have a "(researched tech type)"...
 
About horse breeding
every 40 seconds of game barracks spawn 4 footman and 1 priest. now, with the horse breeding research, it would spawn 4 footman, 1 priest and 2 knights.

Hope it made it more clear
Edit
Oh yes, and for the first problem. Is it possible to make barracks a shared unit, so Human player could upgrade Computer Player creeps. Well kinda
 
Then the condition should be an "integer comparison", "player - current research level of upgrade".


> barracks a shared unit

Well, there is "shared unit control".
Dunno if that works for just one unit...

But, you can make a building owned and used by your player,
and, whenever he does something, like doing some research,
have a trigger that does the same research for your comp.
 
>But, you can make a building owned and used by your player,
>and, whenever he does something, like doing some research,
>have a trigger that does the same research for your comp.

But if there are few players, and one of them researches it to level 2 lets say, while other starts researching to level one. So i shoudl set trigger to set tech level for all players? An as for shared unit control- it would caus ALL units opf player one to be shared with others. I wouldnt want to do that.

The simplest way for me seems to make barracks a shop that would sell items, wich on use would set level o tech higher.

Thanks for your help :)
 
Amfidamant said:
The simplest way for me seems to make barracks a shop that would sell items, wich on use would set level o tech higher.
That should work, as long as a user player (not a computer) buys it.

But you can't detect item abilities being cast; you have to check for an item being used.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top