- Joined
- Apr 19, 2011
- Messages
- 447
Hi there.
As I said in the title, I have two questions, and I hope you can give me solutions:
1 - Is it possible to change the size of an array during the game? I know how to set the size at the beggining of the game, but not during the game.
2 - I'm trying to find the Z height of a point with a custom script, but i got an error when trying to save the map. The trigger is like this:
Position -> A point variable.
Position_Z -> A real variable.
It's the first time I try to do something like this, setting the value of a variable with a custom script. I wanted to try myself to do it before searching for more detailed information, but it seems that I am not able to make it work. When I try to save the map (in the editor), I take a compilation error, and the trigger gets off. I don't want to even imagine what would happen in-game...
Can you please help me? What's the right way to write that script?
Of course, it would be good if you can tell me if that trigger will give me the result I want (the Z height of the Hero).
Regards
As I said in the title, I have two questions, and I hope you can give me solutions:
1 - Is it possible to change the size of an array during the game? I know how to set the size at the beggining of the game, but not during the game.
2 - I'm trying to find the Z height of a point with a custom script, but i got an error when trying to save the map. The trigger is like this:
-
Hero's Position
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
- Set Position = (Position of Hero)
- Custom script: set Position_Z = GetLocationZ(udg_Position)
-
Events
Position -> A point variable.
Position_Z -> A real variable.
It's the first time I try to do something like this, setting the value of a variable with a custom script. I wanted to try myself to do it before searching for more detailed information, but it seems that I am not able to make it work. When I try to save the map (in the editor), I take a compilation error, and the trigger gets off. I don't want to even imagine what would happen in-game...
Can you please help me? What's the right way to write that script?
Of course, it would be good if you can tell me if that trigger will give me the result I want (the Z height of the Hero).
Regards