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

2 quick questions

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Shineyest
What I say is what I am




Joined: 10 Mar 2004
Posts: 21
Location: Here

PostPosted: Tue Mar 23, 2004 8:21 am    Post subject: 2 quick questions Reply with quote

Firstly:
For my custom battle engine I will be able to use equiptment but what I want to know is with "get hero stat" does it read the stat or the stat+equiptment?


Secondly:
How can I set up a script which will be checking a keypress for all of 5 ticks, should I set it so that it does it every tick? or is there another more smooth way?
_________________
I am making a game about thieves


Last edited by Shineyest on Tue Mar 23, 2004 10:26 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Cube
Dimensional Traveller




Joined: 02 Feb 2003
Posts: 294

PostPosted: Tue Mar 23, 2004 8:47 am    Post subject: Reply with quote

1) It just gets the total stat, meaning both the hero's maximum stat and the equipment stat put together. If you want to find out the hero's stat alone, you'll have to first store the equipment he has in variables using "check equipment()", unequip them, find out his current stat, then re-equip them again. (Adding and Removing commands)

2) Not actually sure what you want. Please be more specific.
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Mar 24, 2004 10:52 am    Post subject: Re: 2 quick questions Reply with quote

Shineyest wrote:

Secondly:
How can I set up a script which will be checking a keypress for all of 5 ticks, should I set it so that it does it every tick? or is there another more smooth way?


I am not sure exactly what context you want to do this in, but here is an example autonumber script that illustrates one way of doing it. This could be made simpler, or much more complex, depending on what you are trying to accomplish

Code:
define script(autonumber,timed wait for key,2,0,0)

# This script will wait for a certain key for a certain number of
# game ticks, and will return true if it is pressed within that time
# (or sooner) and will return false if it is not pressed.
script, timed wait for key, key, ticks, begin
  variable(loop)
  variable(got key)
  got key:=false
  for(loop,1,ticks), do, begin
    if(key is pressed(key))
      then(got key:=true)
    if(got key == false)
      then(wait(1))
  end
  return(got key)
end
Back to top
View user's profile Send private message Send e-mail Visit poster's website
junahu
Custom Title: 45 character limit




Joined: 13 Jan 2004
Posts: 369
Location: Hull, England

PostPosted: Thu Mar 25, 2004 6:02 am    Post subject: Reply with quote

you could use tags. Make two tags (eg. tag:pressspacenow and tag:spacepressed). Put the code for pressing the key in the keypress script of the map. When the key is pressed check the first tag (which through another script elsewhere will only be set to on for a short preiod). If the first tag is on then set the second tag to on. The second tag is checked at the end of the same code that flicked the first tag on for a short period. Then you can just reset these tags ready for next time.
_________________
Back to top
View user's profile Send private message Send e-mail
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