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

ohrrpgce mac intel 10.5.8 crash upon opening
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
carsten




Joined: 17 Aug 2012
Posts: 16

PostPosted: Sun Apr 14, 2013 4:13 pm    Post subject: some questions Reply with quote

btw, a couple of questions because I'm not 100% proficient with the software,

1. is there a way to make doors activate only by the "use" input (space bar or enter) with out coding the door every time.

2. is there way i can make it so heros walk over ncps. this way i can use a clear pic and have the ncp trigger events/say somthing as if it wern't an ncp? i have tried editing the general map data and saying heros over ncps, and it looks that way in layers page but i am always running into the ncp and never walking over it.
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: Sun Apr 14, 2013 7:15 pm    Post subject: Re: some questions Reply with quote

carsten wrote:

1. is there a way to make doors activate only by the "use" input (space bar or enter) with out coding the door every time.


Unfortunately, no you have to link doors manually. I am open to suggestions on ways to make door linking easier

carsten wrote:
2. is there way i can make it so heros walk over ncps. this way i can use a clear pic and have the ncp trigger events/say somthing as if it wern't an ncp? i have tried editing the general map data and saying heros over ncps, and it looks that way in layers page but i am always running into the ncp and never walking over it.


that "Heroes over NPCs" setting has to do with the order that layers are drawn. What you want is to change the NPC "Activation" to "Step On"
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Apr 14, 2013 10:17 pm    Post subject: Reply with quote

Wow, that fixed it? I don't actually know why the problem would have gone away.

1. I'm interpreting your question differently than James did. I put my answer here: 'Scripts:Activate doors with a use key'
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
carsten




Joined: 17 Aug 2012
Posts: 16

PostPosted: Thu Jul 18, 2013 4:03 pm    Post subject: any scripting ideas Reply with quote

so now that i'm working on my game, there is a part where i want really creepy echoing footsteps. i want it so that a ten second footstep sound file will start when you walk any direction and immediately cut out when you stop. I've tried using a 1 second move tile loop and it sounds terrible.

this was my miserable attempt at my coding for it


include, plotscr.hsd

plotscript, footstep, begin
if(get hero speed(me) >> 1) then(
play sound (0, true, true))
if(get hero speed(me) << 0) then(
pause sound(0))
end

anyone know have to code this, or if its even possible?

P.S. i have a macbook now. Happy
Back to top
View user's profile Send private message
Doctor TheGiz
Guest






PostPosted: Fri Jul 19, 2013 4:05 am    Post subject: Reply with quote

GetHeroSpeed doesn't work that way. What it's actually referring to is the speed the hero crosses a tile, which by default is 4 (Pixels Per Tick) and is modified with the SetHeroSpeed command. You should try HeroIsWalking instead.
Back to top
carsten




Joined: 17 Aug 2012
Posts: 16

PostPosted: Fri Jul 19, 2013 8:46 am    Post subject: Reply with quote

i see. my hero speed is always 4 weather im walking or not.

this is the changes i made but its not working (just silence)


include, plotscr.hsd

plotscript, footstep, begin
if(hero is walking (me)) then(
play sound (0, true, true))
if(not(hero is walking (me))) then(
pause sound(0))
end
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Jul 19, 2013 9:34 am    Post subject: Reply with quote

Heh, you should create a new thread for new questions; I was worried that the Mac port was broken again.

This is actually surprisingly difficult to do for a combination of unfortunate reasons. An on-footstep is only triggered at the end of a step. And "hero is walking" returns false for one tick whenever you complete a step (one tile), so you can't directly use it to start/stop a sound effect for movements larger than one tile.

Here's my solution: a script that loops continuously (eg. newgame) and remembers the previous value of "hero is walking" to smooth over that one tick gap:

Code:
plotscript, stepping sound, begin
  variable(was moving)
  while (true) do (
    if (hero is walking(me) || was moving) then (
      play sound(sfx:step, false, false)
    ) else (
      stop sound(sfx:step)  # Or pause sound
    )
    was moving := hero is walking(me)
    wait(1)
  )
end

_________________
"It is so great it is insanely great."
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
Goto page Previous  1, 2, 3
Page 3 of 3

 
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