• 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.

Need a respawn system plz

Status
Not open for further replies.
Level 4
Joined
Sep 22, 2011
Messages
70
I again need help with my map, suprise suprise, dont worry your all getting a spot in the laundry list of credits.

This time I need a respawn system, I want it to basically just respawn any non-hero unit controlled by Neutral Hostile about 5min after it dies.

The ability to change the respawn timer based on unit-type or based on what region they are in on the map would REALLY be a double plus plus plus plus super awsome plus.. plus..

plus...


thanks alot.


ps.. plus..
 
Level 4
Joined
Sep 22, 2011
Messages
70
No, it needs to be basically:
A unit dies, <timer> later create 1 unit of unit-type of triggering unit

Im not sure how simple it is.. but for that purpose would just..
  • Set Unit Group based on Region
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Dungeon1 = Units in Dungeon1_Region
    • Set Dungeon2 = ect.
  • Respawns
  • Events
    • Unit - A unit dies
  • Conditions
    • (Owner of (Triggering unit)) Equal to Neutral Hostile
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of units in (Dungeon1)) Equal to 0
      • Then - Actions
        • Set Unit_Type = Unit-type of (Triggering unit)
        • Set Unit_Loc = Position of (Triggering unit)
        • Wait <time> seconds
        • Unit - Create 1 Unit_Type for Neutral Hostile at Unit_Loc facing Default building facing degrees
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in (Dungeon2)) Equal to 0
          • Then - Actions
            • Set Unit_Type = Unit-type of (Triggering unit)
            • Set Unit_Loc = Position of (Triggering unit)
            • Wait <time> seconds
            • Unit - Create 1 Unit_Type for Neutral Hostile at Unit_Loc facing Default building facing degrees
I've never done a respawn system before, and I'm not sure how complicated they have to be to work correctly. Also i've heard some people say using the action
  • Actions
    • Wait <timer> second
is bad to do.. idk if it is or not tho
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Using waits is bad. It's innacure and... bad :). Avoid them as much as you can (without being irracional, it's not Anthrax)

Be aware that, doing as your trigger says, the unit will revive where it died...

There's a Respawn system in the Spell Section, the same used in Gaias Retaliation, that could work. It revives the creeps where they're placed in the map after a while, and don't allows them to go too far from whey they were placed.
 
Level 4
Joined
Sep 22, 2011
Messages
70
Ohhh, i like that, i'll look for it, do you know the name of it or have a link to it? thanks for that, thats pretty much exactly what i need.
 
Level 4
Joined
Sep 22, 2011
Messages
70
ok, thanks alot, should work really well.




ok first problem is a big problem.. It has to be GUI, i can't do jass, dont know how..
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
The best way to have a good system in GUI... is JASS or vJASS :D...

See, JASS is not deep JAVA, C++, BBcode, HTML thing... Is the same than GUI, but more flexible, and without all the -eye-candy- stuff. Besides, you don't have to 'Do JASS' the only thing you need to do is follow instructions.

GUI: Event Response - Picked Unit
JASS: GetEnumUnit()

...Was that so hard?.

-------------------------------------------------------------

Once upon a time, I knew nothing about World Editor... two months later, I now GUI, a really small part of JASS and vJASS... not as to create something, but enough to modify here and there a bit (as most JASS based system allows). I had a lot of problems to, but I feel like in heaven now.

I started just like you: "I want everything in GUI"... Now, I still use GUI, but I use a lot of customs scripts (JASS) in the GUI Triggers... And whenever I want to know how something in GUI is done in JASS, I just create the trigger in GUI, create a copy of it, and convert the copy to custom text (Select Trigger -> Edit -> Convert to Custom Text) then I check the GUI trigger, and see how the same action is written in JASS.

Don't be afraid, it won't eat you, nor bug your map. Create a backup, and follow instructions.

-------------------------------------------------------------

Download JassNewGenPackv5d and last JassHelper version

Install instructions: Insert the JNPG (JassNewGenPack) folder into your Warcraft Directory (The folder, not the files). Extract JassHelper 0.A.2.B somewhere, and replace the jasshelper.exe (In the JNPG\jasshelper folder) with the fresh extracted jasshelper.exe. (Forget about the other files)

Use NewGenWE instead of common WE.

If you find any problem, ask in the forum. There's a bunch of lovely people there that will be pleased to help you :p
 
Status
Not open for further replies.
Top