xoxdragonxox
New Member
- Reaction score
- 1
Solved
Here is my GUI trigger im trying to convert it to jass.
Here is my attempt
My question is can it be done a better way then what i have above.
and here is my 2nd gui
i have no clue how to convert that lol help.... the reason why i wan tthem in jass is because, of cource better performance and no leaks =]
Here is my GUI trigger im trying to convert it to jass.
Trigger:
- ItemS
- Events
- Time - Every 90.00 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to 19, do (Actions)
- Loop - Actions
- Set Points[3] = (Random point in MAP <gen>)
- Item - Create Items[(Random integer number between 1 and 9)] at Points[3]
- Custom script: call RemoveLocation(udg_Points[3])
- Loop - Actions
- For each (Integer A) from 1 to 19, do (Actions)
- Events
Here is my attempt
JASS:
function Trig_ItemS_Actions takes nothing returns nothing
local integer i = 0
loop
exitwhen i > 19
set udg_Points[3] = GetRandomLocInRect(gg_rct_MAP)
call CreateItemLoc( udg_Items[GetRandomInt(1, 9)], udg_Points[3] )
call RemoveLocation(udg_Points[3])
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_ItemS takes nothing returns nothing
set gg_trg_ItemS = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_ItemS, 90.00 )
call TriggerAddAction( gg_trg_ItemS, function Trig_ItemS_Actions )
endfunction
My question is can it be done a better way then what i have above.
and here is my 2nd gui
Trigger:
- MuzzleFlash
- Events
- Unit - A unit owned by Neutral Victim Is attacked
- Unit - A unit owned by Neutral Extra Is attacked
- Conditions
- ((Attacking unit) is A Hero) Equal to True
- Reloading[(Player number of (Owner of (Attacking unit)))] Equal to 0
- Actions
- Special Effect - Create a special effect attached to the weapon of (Attacking unit) using war3mapImported\Konstrukt_ShotgunEffektAttachment.MDX
- Set MuzzleFlash[(Player number of (Owner of (Attacking unit)))] = (Last created special effect)
- Wait 1.00 seconds
- Special Effect - Destroy MuzzleFlash[(Player number of (Owner of (Attacking unit)))]
- Events
i have no clue how to convert that lol help.... the reason why i wan tthem in jass is because, of cource better performance and no leaks =]