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

R.E style cutscens eh?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Fri Nov 04, 2005 3:03 pm    Post subject: R.E style cutscens eh? Reply with quote

Just wondering if an interactive cutscene is possible. By interactive I mean you have a quick window to press a key, if you press it=good cutscene, u dont press it ontime= you get fucked up cutscene.

Possible yesh?No?

_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Nov 05, 2005 2:25 am    Post subject: Reply with quote

Yes, easy. Just use key is pressed. Example:

Code:

variable (counter, key)
counter := 18  #change this
#show an instruction
while (counter) do (
  counter -= 1
  if (key is pressed(key:space)) then (key := 1, counter := 0) #change the key
  wait
)
if (key) then (
  #good things
) else (
  #bad things
)

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Mon Nov 07, 2005 6:37 pm    Post subject: Reply with quote

i get what the script is doin but I'm retarded Raspberry! so could u explain the use of the varibles...I wanna use this script more than once (alot actually) but with diffrent stuff every time.What do I need to change.
_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Tue Nov 08, 2005 11:28 am    Post subject: Reply with quote

The variables are used to A) keep track of how long the player has, and B) to check whether they pressed the correct key.

Code:
variable (counter, key)
counter := 18  #change this


This is how many ticks you want to give the player.

Code:
#show an instruction


Don't forget to tell the player what they're doing

Code:
while (counter) do (


While counter is greater than 0...

Code:
  counter -= 1


...bump the timer down, and...

[/code] if (key is pressed(key:space)) then (key := 1, counter := 0) #change the key[/code]

...check to see whether they pressed a goodly key. If they did, set key to 1, and stop the timer.

Code:
  wait
)


Give the OHR some breathing room

Code:
if (key) then (
  #good things
) else (
  #bad things
)


If key is set, then they pressed the key in time. Thus, do good things. Otherwise, they missed the mark, so do bad things.

You can more or less copy this every time you want to use it with impunity. Except, if you use it more than once in the same script, you don't need to re-declare the variables. And, you should clear key to 0, for the next time.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Tue Nov 08, 2005 12:26 pm    Post subject: Reply with quote

This is a more user-friendly version of the code that makes it easier to understand.

Code:
variable (counter, key)
conter:=18
while (counter>0) do
  (
  decrement (counter,1)
  if (key is pressed(key:space)) then
    (
    key := 1
    counter := 0
    )
  wait
  )
if (key==1) then
   (
  #good things
  )
else
  (
  #bad things
  )


Note how "key" will only equal one if the key is pressed, resulting in good things happening. If the counter is decremented to 0 without the key being pressed, the script will exit the while statement, but "key" will still equal 0, resulting in teh "else" statement being executed. Bad stuff *shivers*.

Hope that helps,

~Worthy
_________________
You can do whatever you want...but prison is full of people who make bad decisions.
Back to top
View user's profile Send private message Send e-mail AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Tue Nov 08, 2005 10:14 pm    Post subject: Reply with quote

You call that user-friendly? I can bloat it even more!

Code:
variable (counter, key)
conter:=18
while (counter>0) do, begin
  decrement (counter,1)
  if (key is pressed(key:space)) then, begin
    key := 1
    counter := 0
  end
  wait
end
if (key==1) then, begin
  #good things
end, else, begin
  #bad things
end

_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Wed Nov 09, 2005 4:52 am    Post subject: Reply with quote

The parentheses are easier to understand.

Also, you guys managed to misspell "counter".
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Wed Nov 09, 2005 11:16 pm    Post subject: Reply with quote

Not everyone is a C programmer.

And, where did we misspell it?
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
SilentAngel
The Angel of Silence




Joined: 16 Dec 2003
Posts: 122
Location: The comfiest chair in #CastleParadox

PostPosted: Wed Nov 09, 2005 11:38 pm    Post subject: Reply with quote

The second line of the code, pkmnfrk Big grin
_________________
Current Projects:
Hikari no Senshi - Inperiaru Taisen: ~10% Complete
http://www.castleparadox.com/forum/download.php?game=392

Stepmania Online Stats:

Next song to pass on Stepmania: Paranoia Survivor Max (Heavy)
Next song to pass on DDR: MaxX Unlimited(Standard)
Back to top
View user's profile Send private message
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Thu Nov 10, 2005 9:59 am    Post subject: Reply with quote

Either I'm stupid, an admin somehow edited our posts without leaving a mark, or you guys are BSing. Quote something.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Thu Nov 10, 2005 10:41 am    Post subject: Reply with quote

...

~Worthy
_________________
You can do whatever you want...but prison is full of people who make bad decisions.
Back to top
View user's profile Send private message Send e-mail AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Thu Nov 10, 2005 11:21 am    Post subject: Reply with quote

pkmnfrk wrote:
You call that user-friendly? I can bloat it even more!

Code:
variable (counter, key)
conter:=18
while (counter>0) do, begin
  decrement (counter,1)
  if (key is pressed(key:space)) then, begin
    key := 1
    counter := 0
  end
  wait
end
if (key==1) then, begin
  #good things
end, else, begin
  #bad things
end


conter:=18

Well, we've ruled out BSing and admin edits...
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Fri Nov 11, 2005 2:39 pm    Post subject: Reply with quote

Ah, I see. Worthy made the mistake, and I missed it when I quoted him and chopped off all of his post. You'll notice that in the post before, it's spelled correctly.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
junahu
Custom Title: 45 character limit




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

PostPosted: Fri Jan 13, 2006 8:00 am    Post subject: Reply with quote

There's a slight problem with this code.

Suppose that the player simply holds spacebar during the entire cutscene. You would want the script to progress to the bad cutscene becuase the player was cheating

Code:
variable (counter, key)
counter:=18

while (counter>0) do, begin
  decrement (counter,1)

  if (key is pressed(key:space)) then, begin
     if(key == 1) then, begin
         key := 2
         counter := 0
     end
  end

  else, begin
     key == 1
  end

  wait(1)
end

if (key==2) then, begin
  #good things
end
else, begin
  #bad things
end


with this code, the player has to press the key AFTER the counter has started.


Edit: I should check the dates on the previous posts more often. The last reply was like 2 months ago. Oookay...
Back to top
View user's profile Send private message Send e-mail
FyreWulff
Still Jaded




Joined: 02 Apr 2005
Posts: 406
Location: The Internet

PostPosted: Fri Jan 13, 2006 9:15 am    Post subject: Reply with quote

If you want to be evil like the actual RE4, you can also use random to make it change up the buttons/keys to press.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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