Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Multiple Triggerings of Script

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Guest







PostPosted: Sat Apr 26, 2003 9:18 pm    Post subject: Multiple Triggerings of Script Reply with quote

I've made an on-key-press script that is supposed to activate every time the spacebar is pressed. In order to make sure that the script isn't reactivated again and again, I have put the "suspend player" command in right after the script begins. However, this does not work. Instead, if one is to hold the space bar, it will keep on activating again and again until there is a script buffer overflow. Why is this happening because it's REALLY annoying. I guess what I'm getting at is finding out if there is a way to prevent the game from registering that the player is pressing any buttons, or in other words, a sort of "suspend key press" command.
Back to top
Blazes Battles Inc.
I'm a chimp, not a




Joined: 25 Jan 2003
Posts: 505

PostPosted: Sat Apr 26, 2003 9:35 pm    Post subject: Reply with quote

At the beginning of the script, have this:
Code:
if (check tag (#==off)
then(set tag (#,on)
# ALL THE NORMAL COMMANDS OF THE SCRIPT
set tag (#,off))
else()
end

That way, if the script is running, and so the tag of your choice is on, if it is triggered again it will just end and the first will continue. When it ends, it will turn the tag off, allowing the script to be triggered again.
_________________
Preserve OHR history! Do it for the children!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group