| 01-15-2006, 09:30 PM | #1 |
I don't know how to change this trigger to save the trackable in this game cache. Anyone have any ideas? Custom script: call StoreInteger(udg_cache, I2S(H2I(udg_Trackable[udg_Integer])), "i", udg_Integer) Code:
function H2I takes handle h returns integer
return h
return 0
endfunctionCode:
function CreateTrackableZ takes string path, real x, real y, real z, real face returns trackable
local destructable d = CreateDestructableZ( 'OTip', x, y, z, 0.00, 1, 0 )
local trackable tr = CreateTrackable( path, x, y, face )
call RemoveDestructable( d )
set d = null
return tr
endfunctionCode:
Set Trackable_Point[0] = (Point((Min X of (Entire map)), (Min Y of (Entire map))))
Set Integer = 0
For each (Integer B) from 1 to 20, do (Actions)
Loop - Actions
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Set Integer = (Integer + 1)
Set Temp_Real3[1] = ((X of Trackable_Point[0]) + (Temp_Real3[0] x (Real((Integer A)))))
Set Temp_Real3[2] = (Y of Trackable_Point[0])
Set Temp_Real3[3] = (100.00 x (Real((Integer B))))
Custom script: call CreateTrackableZ( "Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl", udg_Temp_Real3[1], udg_Temp_Real3[2], udg_Temp_Real3[3], 0.00 )
Custom script: call StoreInteger(udg_cache, I2S(H2I(udg_Trackable[udg_Integer])), "i", udg_Integer) |
| 01-15-2006, 09:40 PM | #2 |
Code:
Custom script: set udg_Trackable[udg_Integer] = CreateTrackableZ( "Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl", udg_Temp_Real3[1], udg_Temp_Real3[2], udg_Temp_Real3[3], 0.00 )
Custom script: call StoreInteger(udg_cache, I2S(H2I(udg_Trackable[udg_Integer])), "i", udg_Integer)And it isnt quite clear why you dont just use forloopaindex here instead of another integer, or just use a jass loop instead of a gui one. Simple turn to jass and itll all become quite clear. |
| 01-15-2006, 10:32 PM | #3 |
The reason for using the integer instead of the for loop is because I have this trigger four times. The number for saving needs to keep going up or it will just overwrite everything. Thank you. |
