Page 1 of 1
The script event is a great way to customize your game
Posted:
Tue Jul 24, 2007 8:59 pm
by Fuzzy
So i am curious, how much do you use it?
Posted:
Fri Jul 27, 2007 4:35 pm
by supa-tails
I use the ones I KNOW how to use, otherwise, I'm cluless!
Posted:
Mon Jul 30, 2007 8:31 pm
by DocRabbit
I actually prefer to use the scripting. The quick ways are nice, but when it comes to debugging it, it is much easier to find the problem if all is done in scripting.
Posted:
Tue Jul 31, 2007 1:41 am
by pavel329
the script is better,but why is there not a keydown function?
Posted:
Tue Jul 31, 2007 1:53 am
by Game A Gogo
pavel329 wrote:the script is better,but why is there not a keydown function?
it is possible doing a keydown function in the script!
Repeat action:
- Code: Select all
char*key=GetKeyState();
if(key[KEY_LEFT]==1)
{
//action to be repeated every frame
}
and for not repeat usage
- Code: Select all
char*key=GetKeyState();
int No_Repeat;
if(key[KEY_LEFT]==1 && No_Repeat==0)
{
//action not to be repeated
No_Repeat=1;
}
else
{
No_Repeat=0;
}
That should do it
remeber you can change the KEY_LEFT to another key, look in the script reference offered whit GE
Posted:
Tue Jul 31, 2007 3:34 am
by arcreamer
i dont understand that script u just posted game a go, can i describe it for me a little please? im still learning
Posted:
Wed Aug 01, 2007 12:22 am
by automail10
i only use it when i must.
(the move actor event wont work.)
Posted:
Wed Aug 01, 2007 2:11 am
by Game A Gogo
arcreamer wrote:i dont understand that script u just posted game a go, can i describe it for me a little please? im still learning
It will check if a certain key is pressed hwit the if statement since key contains all array of keys, and have a value of 0 and 1, 1 being pressed.
Posted:
Wed Aug 01, 2007 2:52 am
by Fuzzy
automail10, do you mean the Moveto event? be aware that there is moveto and MoveTo as well. one is for pixel drawing, and the other is to move actors.