I'm trying to TILE some dirt models to make a ground, instead of doing it with WED, I wanted to make a script that automaticaly generates the tile (for however long or big).
We all know that if you create two or more entities with the same pointer, and you change the xyz cords of the pointer (like thing.x += 10), then everything with the pointer (even if more than one entity) will all move.
This being taken into consideration, I made a global variable called 'placement[3],0,0,0'.
In the ent_create(-----) function, one of the parimeters is the initial position.
ent_create("gndtile.mdl",PLACMENT,NULL);
In the function that I used in order to MODIFY the xyz cords of PLACEMENT[3], which is an outside function, I tryed to modify
my variable so that the NEXT generated tile would pop up
855 quants further down the .X cords.
My modification looked like this.
placement.x += 855;)
When I tryed to run that,
I got an error messege saying,
" 'X' is not a member of 'function' ".
What i'm trying to figure out is WHY I cannot modify placement.x (or .y or .z) from within a function OTHER than the function that created the entity.
It worked before with C-Script, won't work with LC.
placement[3] is a global variable, so it's not like i'm tring to use a local variable that exists within another function in the script.
Last edited by Vonman; 09/18/08 06:12.