| 01-14-2006, 04:41 PM | #1 |
I can't get this trigger to work. I get the compile error message "Expected a name". I'm assuming it means the path for the model (*.mdl). Anyone have any ideas? http://www.wc3jass.com/viewtopic.php?t=1997 This function is copyed from the above web page. It creates a destructable at a height and then creates a trackable on top of it, giving the trackable height. Code:
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
endfunctionThis is the trigger I'm using. But I'm getting a error message. Code:
Set Trackable_Point[0] = (Point((Min X of (Entire map)), (Min Y of (Entire map))))
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
// Point X
Set Temp_Real3[1] = ((X of Trackable_Point[0]) x (Real((Integer A))))
// Point Y
Set Temp_Real3[2] = (Y of Trackable_Point[0])
// Point Z
Set Temp_Real3[3] = (100.00 x (Real((Integer A))))
Custom script: call CreateTrackableZ( Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl, udg_Temp_Real3[1], udg_Temp_Real3[2], udg_Temp_Real3[3], 0.00 ) |
| 01-14-2006, 04:43 PM | #2 |
Please use jass tags and trigger tags next time. Why didnt it work? You forgot to use " " around the pathstring, and you forgot to replace \ with \\ ( \ is an "escape" character in program languages) |
| 01-14-2006, 04:48 PM | #3 |
in fact I am impressed that call didn't make world editor crash, maybe they fixed it in last patch. And yes, use "" to enclose strings and \\ instead of \ |
| 01-14-2006, 05:13 PM | #4 |
Ok, I'll fix it. I just added in the // to give more information. It's not part of the copyed code. |
| 01-14-2006, 05:14 PM | #5 |
I just added the " at the start and end of the string and when i tired to save the editor crashed. lol Edit: Fixed. Sorry I misunderstood. I thought you ment use \\ instead of // for the comments. TY |
