Please help this nub :D

G

Gyros321

Guest
ok I am doing a basic revive command.
i have right now nothing really
Code:
Events
Every 2.00 seconds of game time
Conditions
Action
If, Then, Else (multiple functions)

well i mean thats as far as I have. I want it so that every 2 seconds it will revive a certain unit if it dies else do nothing. This is a very basic command. However the units I want to revive are NOT heros (hence not able to revive).

So can someone give me a command like this that will revive or do something with those units?

Thanks.

P.S. WHen I tried changing all the units into heros (made a new custom unit as a hero) everything was messed up. All my triggers condition statements got changed to that new hero but in my maze I have two different types of heros. Let's say in one trigger I had Hero A as a condition (i.e. Unit type of (triggering unit) =/= to Hero A). It changed all the Hero A's to Hero B's (the new hero).

And I had at least 100 + triggers with conditions on hero A so i don't want to redo it all.

Thanks again!

P.S.S
This is what I have so far... in my other revive
Code:
Events
    Unit - A unit owned by Player 1 (Red) Dies
    Unit - A unit owned by Player 2 (Blue) Dies
    Unit - A unit owned by Player 3 (Teal) Dies
    Unit - A unit owned by Player 4 (Purple) Dies
    Unit - A unit owned by Player 5 (Yellow) Dies
    Unit - A unit owned by Player 6 (Orange) Dies
    Unit - A unit owned by Player 7 (Green) Dies
    Unit - A unit owned by Player 8 (Pink) Dies
    Unit - A unit owned by Player 9 (Gray) Dies
    Unit - A unit owned by Player 10 (Light Blue) Dies
Conditions
Actions
    If ((All units of (Units of type Dead guy) are dead) Equal to True) then do (Set Continue = (Continue - 1)) else do (Skip remaining actions)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            Continue Equal to -1
        Then - Actions
            Cinematic - Fade out over 10.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
            Wait 1.00 seconds
            Player Group - Pick every player in (All players) and do (Game - Defeat (Picked player) with the message: You have failed to ...)
        Else - Actions
            Wait 2.00 seconds
            Sound - Play Warning <gen> at 100.00% volume, located at (Center of Reallevel) with Z offset 0.00
            Hero - Instantly revive Dead guy 0012 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0013 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0014 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0015 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0016 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0017 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0018 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0019 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0020 <gen> at (Center of Reallevel), Hide revival graphics
            Hero - Instantly revive Dead guy 0021 <gen> at (Center of Reallevel), Hide revival graphics
            Player Group - Pick every player in (All players) and do (Camera - Pan camera for (Picked player) to (Center of Reallevel) over 0.00 seconds)
            Game - Display to Player Group - Player 1 (Red) the text: (|c00eaea99Your Continues ( + ((String(Continue)) + )))
            Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to (|c00eaea00Continues   + (String(Continue)))
            Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (|c00eaea00Level  + (String(Level)))
 

MaaxeEvid

New Member
Reaction score
8
not heros cant revive...just a tip, you need to replace something like this, i dont use GUI more
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
891
You would have to replace the unit with another since it's not a hero.
 
G

Gyros321

Guest
I am sorry but I don't get what you're saying. Are you saying just to make them new heros? If thats the case then I will do it I am just lazy >.>

EDIT: oops didn't see last post.

ok problem 2.

In my maze I have a party where the guys wander. But I want it to be a periodic event. They just randomly do it and they do it VERY SLOW (i gave them the ability wander (neutral)). Like they do it all discordantly and they do it maybe every 5 seconds. I want them to do it all at the same time and actually do it every 2 or so seconds. Thanks for help!
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
891
This should work:

Code:
Wander
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set TempUnitGroup = (Units in <Your Region>)
        Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            Loop - Actions
                Set TempPoint = ((Position of (Picked unit)) offset by 300.00 towards (Random real number between 1.00 and 360.00) degrees)
                Unit - Order (Picked unit) to Move To TempPoint
                Custom script:   call RemoveLocation(udg_TempPoint)
        Custom script:   call DestroyGroup(udg_TempUnitGroup)
 

ArmedCitizen

Kisses Cats
Reaction score
198
Code:
Events
Time - Every 2 seconds of the game
Conditions
Actions
Unit Group - Pick every unit in Units In *Your Region* and do actions
     Actions
       Unit - Order (Picked unit) to move to random point in *Your Region*

I'm not sure if you can just edit the Wander Ability to be every 2 seconds. Might try that before resorting to triggers.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
891
>I'm not sure if you can just edit the Wander Ability to be every 2 seconds. Might try that before resorting to triggers.

There's nothing like that under Wander, unfortunately.
 
M

Mythic Fr0st

Guest
Ghan_04, your code leaks,

Fixed code: (In red)

Code:
Wander
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set TempUnitGroup = (Units in <Your Region>)
        Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            Loop - Actions
                Set TempPoint = ((Position of (Picked unit)) 
                [COLOR="Red"]Set TempPoint2 = TempPoint offset by 300.00 towards (Random real number between 1.00 and 360.00) degrees)[/COLOR]
                Unit - Order (Picked unit) to Move To TempPoint
                Custom script:   call RemoveLocation(udg_TempPoint)
                [COLOR="Red"]Custom script:   call RemoveLocation(udg_TempPoint2)[/COLOR]
        Custom script:   call DestroyGroup(udg_TempUnitGroup)
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
891
Ghan_04, your code leaks,

Fixed code: (In red)

Code:
Wander
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set TempUnitGroup = (Units in <Your Region>)
        Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            Loop - Actions
                Set TempPoint = ((Position of (Picked unit)) 
                [COLOR="Red"]Set TempPoint2 = TempPoint offset by 300.00 towards (Random real number between 1.00 and 360.00) degrees)[/COLOR]
                Unit - Order (Picked unit) to Move To TempPoint
                Custom script:   call RemoveLocation(udg_TempPoint)
                [COLOR="Red"]Custom script:   call RemoveLocation(udg_TempPoint2)[/COLOR]
        Custom script:   call DestroyGroup(udg_TempUnitGroup)

Wow. Thanks. I never knew you had to do that if you were just setting the whole thing in a variable. :D
 
G

Gyros321

Guest
Wow thanks for that information. Okay next question!

In my maze I have two units. Let's say Unit A and B. Unit A works fine. Unit B is an EXACT copy of Unit A except it has the spell "permanent invisibility".

Now when I get to this one part I am creating units (sorry I can't open up world edit atm since I gotta go right after this post) and then ordering them to patrol somewhere. I make 7 units of type Unit A and they patrol fine.

But when I make 7 units of type Unit B they don't appear AT ALL. I know they are invis. Duh. But when i go to the place where they should be (with truesight and far sight, and owl scout on) they arn't there (not even in invisible). And even if they are somehow they are not killing my characters. But units of Type Unit A still do. Unit B is an exact replica except it has permanent invisibility. So why are they not being created? Thanks!.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
891
1. Try taking the permanent invisibility off them.
2. Make sure they didn't move somewhere else.
 
G

Gyros321

Guest
Ok 1. Just did. They appear and are there.
2. They are not moving anywhere else.

Can someone help me with this? Its really irritating. i can't figure out why they just are not appearing and why they won't kill when invisible.


Now a new problem has arised. Whenever i tell someone to patrol.. this happens (look at diagram)

A = left end point
B = right end point
. = normal path to patrol
, = path they take
@ = just ignore this. I don't know how to space something out to put it in the middle of the screen. Every time I try it just ends up appearing left. So this is used to space.

@@@@@@@@@@@@@,,,,,,,,,,,,,,,,,,,,,,,,,,@@@@@@@@@@@@@@@@
@@@@@@@@,,,,,,,,,,,,@@@@@@@@@@@,,,,,,,,,,,,,,,,,,,,@@@@@@@@
A...................................................................................................B

Like my patroler willl start at A and move upwards along the comma trail instead of going on the period trail. its very irritating and I don't feel like putting a little region every like five steps and ordering it to go from that to the next one that is five steps ahead etc. etc. Its just irritating.

So can someone help me with these 2 new problems? thanks!
 

Arkan

Nobody rides for free
Reaction score
92
About patrolling,
are you ordering units owned by neutrals? In that case you might wanna change some values in gameplay constants, like Creep Guard Return distance and some other fields I can't remember.
 
G

Gyros321

Guest
No no. They are custom units (undead obs. statues) owned by player 12 (computer player).

But see this is always happening in any maze i play. If I click from point A to point B and there is a wide gap in between them, my guy won't run in a straight line. He'll go in a somewhat arc motion way towards the point. usually this ends up killing me because he goes off path..... does anyone know how to fix it?
 
G

Gyros321

Guest
Ok thanks. It was a bit confusing but I think I got it. But does anyone get the invisible unit part?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top