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

Another help request from me

Status
Not open for further replies.
Level 19
Joined
Aug 24, 2007
Messages
2,888
Well I think you heard this question 999999999999 times but Im gonna ask again
Is there a way to make a creep respawn in its FIRST LOCATION after few seconds WITHOUT USING REGIONS
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
JASS:
function Trig_Respawn_Trigger_Actions takes nothing returns nothing
    local unit Respawn = GetDyingUnit()
    local location Revive = GetUnitLoc(Respawn)
    call TriggerSleepAction( 30.00 )
    call CreateNUnitsAtLoc( 1, GetUnitTypeId(Respawn), Player(PLAYER_NEUTRAL_AGGRESSIVE), Revive, bj_UNIT_FACING )
    call RemoveLocation (Revive)
    set Revive = null
    set Respawn = null
endfunction

//===========================================================================
function InitTrig_Respawn_Trigger takes nothing returns nothing
    set gg_trg_Respawn_Trigger = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Respawn_Trigger, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Respawn_Trigger, function Trig_Respawn_Trigger_Actions )
endfunction

Create a trigger named Respawn Trigger.
Convert the trigger to custom text.
Remove everything, and copy the code above into it.
Modify TriggerSleepAction( 30.00 ) for the wait time.

[For others: I know this isn't 100% JASS, but this is my way of working.]
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
PurplePoot is right and this is not jass already you just converted it into custom text to look cool
LAME

And Custom Value is really good option thanks PurplePoot
 
Level 9
Joined
Jun 26, 2007
Messages
659
this is not jass already you just converted it into custom text to look cool
"custom text" is JASS -_-

you can use local trigger this way:
in the global trigger wich occurs when the unit spawn (with your conditions)
create a local point to save the unit position
create a local trigger wich do "when the specific triggering unit die, turn off itself"
wait for the local trigger is turned off
create a new unit at the local point
remove the point and the local trigger

create a local trigger that turn itself off and wait this state is a great way to perform kind of wait-for-event action.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
sorry I meaned this is a GUI converted into custom text nothing else special, there are lot of things in jass you cannot do with GUI but this doesnt contain any of them I just meaned this. sorry for missunderstanding
 
Level 9
Joined
Jun 26, 2007
Messages
659
nothing else special
nothing else... that's just proper, you can ask someone who is used to make his trigger in JASS for a properness purpose and who probably never make GUI trigger to suddently change his way of coding. it's just his use, this has nothing to do with laming; you can't freely assume his intentions, his trying to help you and you blame him... are you sure that's the right way...?

PS: there is probably nothing in JASS you cannot do with GUI trigger, that's just harder but i'm pretty sure you can do everything only with trigger and variable.
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
Lame ? I'm not lame, you can't read, so I assume you'll need to get glasses.
Read my whole post, and not only the code.

And I don't need to know JASS in order to look cool.
I'm using a combination of GUI & JASS, ....
Normaly I only use custom scripts in GUI, but this makes it easyer to copy anyway.
->

Heero said:
[For others: I know this isn't 100% JASS, but this is my way of working.]
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
hmm sorry you are right my bad lets just say I cant be calm these days everything makes
The real part of the thing makes me angry about your code explains unit revives in same place so I tought you didnt read all its nothing about you really
me act like harmer (or how do you translate this situation in english)
well dont pay atention (or was it dont be ofended)
 
Status
Not open for further replies.
Top