• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Moving Units

Status
Not open for further replies.
Level 9
Joined
Jul 1, 2005
Messages
393
I was play testing a map, and told the maker about an issue, he said he didn't know the answer to it, and if he could find it that would be great. I think this is like some issues in older TD's. What do you guys think?

"If you know of any way to fix marines camping spawn, I'd appreciate the help. Code is, every 20 seconds, create 1 marine(2 codes) for player pink, attack move to Alien spawn region. Most of them do it, but some decide not do."

The code is identical to the Aliens, whom do not camp.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Or paste it in a fresh map.

P.s. SilverSong I will get down to business tomorrow after I get back from the exam( or the drinking after it) ;)
 
Level 9
Joined
Jul 1, 2005
Messages
393
JASS:
marine spawning Copy
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        Unit - Create 1 Soldier for Player 8 (Pink) at (Center of Region 002 <gen&gt;) facing 180.00 degrees
        Unit - Order (Last created unit) to Attack-Move To (Random point in Egg Item Spawning <gen&gt;)
        Wait (1000000000.00 + 1000000000.00) seconds
        Unit - Order (Last created unit) to Attack-Move To (Random point in Egg Item Spawning <gen&gt;)
 
Level 9
Joined
Jul 1, 2005
Messages
393
Quote: What the fish is this?

Author: That seems to prevent creep build-up, it was at 2mins, im experimenting with what would happen if it were extremely high.

SS: Creeps have a way of just compacting into massive groups of non-moving units, each one trying to go the other way -> <- blockading sections of the map.

Author: Every now and then, some of the spawned bots will decide not to suicide and run back to their spawn to camp it instead. adding wait and reorder timer got rid of most of them, assuming queen/commander is in the game. But if the wait timer doesn't exceed the time before they decide to go awol, it won't work

The idea behind the delay to catch them after they awol, and reorder them back to the front, hoping they don't do it again, since i have no idea how to stop it in the first place.

(Center of AlienRespawn <gen&gt;)
is the area with alien queen, so, as you would think, they should attack move there and die.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
I believe their straying off can be solved by modifying the respective fields in the gameplay constants and the object editor.
I remember many threads about this problem, so you might want to either look up a tutorial on this somewhere or search threads.

Even if I'm wrong I would do it otherwise. When the unit chickens home it must be issued an order. That orders OrderID must be different than the attack move's OrderID, so I would do this:
Whenever a unit owned by YourPlayerWhoControlsTheCreeps is issued an order.
If the units orderid is F.ishThisGuysI'mChickeningOut! order it again to attack move to that region.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
what would that trigger look like exactly?

Isn't that exactly what the previous trigger did?

No it is not.
Because with the wait(during it), the unit can still 'flee' and stay idle for the rest of the wait.
And btw that does not work as after the wait last created unit will not refer to that unit(to avoid this a local variable unit is suggested).
What emperor_d3st suggested seems a good idea but I am going to bed early today :D
 
Level 9
Joined
Jul 1, 2005
Messages
393
He put about 8 of those in around the map. It seems to work but... it increased the map load up time by about 1-2 seconds. I don't know why, but that map has problems in it. It takes much longer to load than I think it should.

I don't know if it's initilization, triggers, leaks, or something else. Maybe all the skins/models he put in. Most maps I load up on my computer load right up in 2-5 seconds. DotA takes 10 seconds, The Black Road takes 26 seconds. AVP takes 36 seconds. In the City of Drugs takes 38 seconds.

I do not like maps that take over 20 seconds to load myself.
 

Attachments

  • Aliens vs Predator 2.5.w3x
    3 MB · Views: 46
Status
Not open for further replies.
Top