Having a similar issue. My camera remains steady but whenever I move over a cliff that rises or declines very rapidly, or a highground cliff, the unit's height position jumps around for a brief period, together with any camera that's following its position.
Even when using the "Ignore terrain height" unit option it still jumps around even if the unit should be using world coordinates and floating in midair..
Wish you could just ditch the built in collision detection with their height maps alltogether, this problem is making any map with vertical movement a rage inducing process
Took me ages before I realized the editor had functions haha
There's actually a way to call functions from the GUI; have the function return boolean true after completing successfully and use a "SetVariable blnOk = myFunction(params)" to call the function.
In first person it's mostly smooth, once you bring your character on screen the camera does get jerky when turning the character.
Though I imagine you could do the same thing with issue'ing orders as long as the issue order and height offset are right after another in the game loop, I'll give it a go later
Oh wow you can change that? The constant flickering from auto-adjustments was driving me nuts
I don't know if you're doing all the movement from instant positioning or some combination of issue ordering, but if the former try reading from stored vectors/points at all times and only writing to the unit, like this:
gameloop(){
newposition = oldPosition + movement;
Turn ignore Height State On
Move unit instantly to newposition
Set unit height to Z-value of newposition
oldPosition = newposition
}
Ah I see, many thanks. I think I'll use the array trick for my return values as well, using the index for the # of return value. That should cut down on the need for structs a lot already
Haha that's clever, thanks! Can anyone verify this method still works though? I'm getting a syntax error when using the struct in any other custom script outside of the Trigger:
As far as passing structs goes, I guess I could serialize them to a string if they only contain primite types & other structs. But that's.. very messy and would probably slow things down a lot
Hello, I've been using the GUI exclusively so far and ran into some limitations passing data around using basic types.
So I tried switching to using structs. However 2 problems I'm having:
Tried using this code for saving the result of a Vector struct operation and it throws me a Syntax error on the function declaration.. same thing when I try to use the Monkey example from the website's Wiki.
Problem2:
Function aside, if I just leave the Vector struct there, compile and import to my MapScript.galaxy again. Then try to initialize a Vector from a Custom Script action in the GUI, I get a Syntax error, Script view pops up showing my original mapscript. I remove the code and save and boom, my imported mapscript gets overwritten by the original.
So I'm a bit at a loss here on writing galaxy code and how to combine it with coding in the GUI. If someone could point me in the right direction that would be much appreciated.
And since this is my first topic here and I don't like taking without giving, here's the code to :
Link Removed: http://www.mediafire.com/download.php?rw02wll3jk2
Edit: Oh god you had to press Save in the import window itself *hides in shame*
Hi, thanks for the writeup. I'm having some issues having the editor locate my custom script, getting "Include file not found" on compilation.
The script is stored under "Lib/Script.galaxy" in my map's folder. Also tried importing the script, still can't find it. Does it need to be in some other position not relative to your map?
0
Having a similar issue. My camera remains steady but whenever I move over a cliff that rises or declines very rapidly, or a highground cliff, the unit's height position jumps around for a brief period, together with any camera that's following its position.
Even when using the "Ignore terrain height" unit option it still jumps around even if the unit should be using world coordinates and floating in midair..
Wish you could just ditch the built in collision detection with their height maps alltogether, this problem is making any map with vertical movement a rage inducing process
0
Took me ages before I realized the editor had functions haha
There's actually a way to call functions from the GUI; have the function return boolean true after completing successfully and use a "SetVariable blnOk = myFunction(params)" to call the function.
0
@rrowland: Go
In first person it's mostly smooth, once you bring your character on screen the camera does get jerky when turning the character.
Though I imagine you could do the same thing with issue'ing orders as long as the issue order and height offset are right after another in the game loop, I'll give it a go later
0
@rrowland: Go
Oh wow you can change that? The constant flickering from auto-adjustments was driving me nuts
I don't know if you're doing all the movement from instant positioning or some combination of issue ordering, but if the former try reading from stored vectors/points at all times and only writing to the unit, like this:
gameloop(){
newposition = oldPosition + movement;
Turn ignore Height State On
Move unit instantly to newposition
Set unit height to Z-value of newposition
oldPosition = newposition
}
0
@s3rius: Go
Ah I see, many thanks. I think I'll use the array trick for my return values as well, using the index for the # of return value. That should cut down on the need for structs a lot already
0
Haha that's clever, thanks! Can anyone verify this method still works though? I'm getting a syntax error when using the struct in any other custom script outside of the Trigger:
As far as passing structs goes, I guess I could serialize them to a string if they only contain primite types & other structs. But that's.. very messy and would probably slow things down a lot
0
Hello, I've been using the GUI exclusively so far and ran into some limitations passing data around using basic types. So I tried switching to using structs. However 2 problems I'm having:
Problem1:
Tried using this code for saving the result of a Vector struct operation and it throws me a Syntax error on the function declaration.. same thing when I try to use the Monkey example from the website's Wiki.
Problem2:
Function aside, if I just leave the Vector struct there, compile and import to my MapScript.galaxy again. Then try to initialize a Vector from a Custom Script action in the GUI, I get a Syntax error, Script view pops up showing my original mapscript. I remove the code and save and boom, my imported mapscript gets overwritten by the original.
So I'm a bit at a loss here on writing galaxy code and how to combine it with coding in the GUI. If someone could point me in the right direction that would be much appreciated. And since this is my first topic here and I don't like taking without giving, here's the code to : Link Removed: http://www.mediafire.com/download.php?rw02wll3jk2
0
Edit: Oh god you had to press Save in the import window itself *hides in shame*
Hi, thanks for the writeup. I'm having some issues having the editor locate my custom script, getting "Include file not found" on compilation.
The script is stored under "Lib/Script.galaxy" in my map's folder. Also tried importing the script, still can't find it. Does it need to be in some other position not relative to your map?