| 07-02-2006, 02:06 AM | #1 |
OK well im using this script made by one of the demo maps, but this is that error i get.... function Revive_Creep takes nothing returns nothing local integer i set i = GetUnitUserData(GetTriggerUnit()) call TriggerSleepAction( 30.00 ) // This is the time inteveral before the unit is respawned. call CreateUnitAtLoc( Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Types[i], udg_Creep_Positions[i], bj_UNIT_FACING ) // This respawns the creep for Neutral Hostile at it's starting location. call SetUnitUserData( GetLastCreatedUnit(), i ) endfunction //=========================================================================== function InitTrig_Creep_Revive takes nothing returns nothing set gg_trg_Creep_Revive = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_Creep_Revive, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_Creep_Revive, function Revive_Creep ) endfunction then the error Line:432 Expected a Name....for this line...call CreateUnitAtLoc( Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Types[i], udg_Creep_Positions[i], bj_UNIT_FACING ) ive tried many things, but idk whats wrong plz help =] |
| 07-02-2006, 02:29 AM | #2 |
You must have the integer array Creep_Types and location array Creep_Positions in the variables section of your map. |
| 07-02-2006, 02:32 AM | #3 |
so for location array u mean point array? if so then thx fer the help =] |
| 07-02-2006, 02:33 AM | #4 |
Yes, a point array. |
| 07-02-2006, 02:34 AM | #5 |
Alright thanks a lot...rep added=] |
| 07-02-2006, 02:45 AM | #6 |
grrr ok...ive added the vars and everything saved...no errors but now nothing revives...it just dies, and stays dead...do i need to specify regions hmm any further help would be appreciated |
| 07-02-2006, 03:08 AM | #7 |
| 07-02-2006, 03:15 AM | #8 |
intvar = interger 0(default) or is it anoter predefined integer? |
| 07-02-2006, 03:30 AM | #9 |
and one more thing..the last part of ur trigger...i cant seem to find = unit type of picked unit...is it a unit type array var?? Edit: Nvm i had the Creep_Types set to integer arrays not unit type array...solved thx=] |
| 07-02-2006, 03:42 AM | #10 |
ok so almost there...all the creeps respawn where they origionally were, but they only respawn once after that, they dont come back ne more...what to do? |
| 07-02-2006, 03:51 AM | #11 |
It might help if you showed all the changes you've made to the triggers you're using for respawn. Also, use the JASS and trigger tags and don't double/triple post. |
| 07-02-2006, 01:30 PM | #12 |
Whoever made that revival system is not very expirienced as CreateUnitAtLoc is a native and therefore doesnt change the bj_lastCreatedUnit variable. Replace your revival code with this and it will work JASS:function Revive_Creep takes nothing returns nothing local integer i = GetUnitUserData(GetTriggerUnit()) call TriggerSleepAction(30) call SetUnitUserData(CreateUnitAtLoc(Player(12), udg_Creep_Types[i], udg_Creep_Positions[i],GetRandomReal(0,359)),i) endfunction function InitTrig_Creep_Revive takes nothing returns nothing set gg_trg_Creep_Revive = CreateTrigger() call TriggerRegisterPlayerUnitEvent(gg_trg_Creep_Revive, Player(12),EVENT_PLAYER_UNIT_DEATH,null) call TriggerAddAction(gg_trg_Creep_Revive,function Revive_Creep) endfunction |
| 07-02-2006, 02:26 PM | #13 |
kk that worked shadow...thanks for everyones help/sry for double posting. wont happen again=P |
| 07-02-2006, 02:30 PM | #14 |
Do not use TriggerSleepAction(30)! PolledWait is far better, even if it does have a marginal leak. TriggerSleepAction(30) could equate to anything between 0 and 60 game time seconds. |
