Page 1 of 1

Help me about scripts.

PostPosted: Tue Jan 01, 2008 1:16 am
by kirby
I need to know how to use this such functions. Please? I have no idea how to work. :cry:

1):Load game function - "I used Tiles, And Draw tiles on the map. Then i Use load game function. It load the others things,
But it din't laod the tiles. Have you got any idea how to avoid this :cry:
2):How to use the MAX functions. I need to make value limited. plz...? :cry: I treid everything, but nothing happen.

:cry:

Re: Help me about scripts.

PostPosted: Tue Jan 01, 2008 1:54 am
by edh
1) are your tiles in a group? I think that only values in a groups are saved and loaded.

2) I have not used MAX, but in my experience, MAX usually returns the highest of two numbers. If you want to limit a number, what about something like this:
if (value > MaxValue) { value = MaxValue; }
That will limit some given value to MaxValue or less.

Re: Help me about scripts.

PostPosted: Tue Jan 01, 2008 4:59 am
by Fuzzy
Try this: http://game-editor.com/forum/viewtopic.php?f=4&t=4939

and the way max works is max(highest value, variable)

so...
Code: Select all
directional_velocity = max(10, directional_velocity);


or min..

Code: Select all
directional_velocity = min(1, directional_velocity);

Re: Help me about scripts.

PostPosted: Tue Jan 01, 2008 6:11 am
by kirby
Well, my tiles is like this. See the load game function, it won't load the tiles, weird.
And thank you fuzzy. But....... :cry: :cry: :cry: :cry: :cry: Sorrry... I don't understand much. Is there
any demos... by the way? I want my value work like this.

make any actor viarable. Example "Value" Integer, Actor Viarable:

Code: Select all
Value = 10;

And the max is Value = 10;, and Min is 0. :cry: UUuuuuuu.... wonder how to do that? :roll:
And thanks for your all help too. 8)
And.... Do you under stand what am i saying? :shock: