Kaned! Help me!

mersox

Active member
I have a bunch of questions. I have wasted a ridiculous amount of time with each of these issues, and have no idea how to solve them. Please help.

1.- Hit sound.

The issue: I have a hit sound I want to be played each time a specific enemy is hit, but not others. For the others I will keep the default OpenBOR sound.
If I include the sound in the enemy's "pain" animation, well, IN THEORY it would override the default hitting sound. But I'm not interested in testing that theory because I'm not planning to do this:

anim pain
sound data/sounds/puttyhit.wav

But rather:

anim pain
@cmd randSound7 "puttyhit1.wav" "puttyhit2.wav" "puttyhit3.wav" "puttyhit4.wav" "puttyhit5.wav" "puttyhit6.wav" "puttyhit7.wav"

And a great thing about the randsound script is that it lets you play multiple sounds at once, so you can have a karate yell playing alonggside a swoosh sound. That's perfect, except in this case, where "puttyhit1.wav" plays at the same time as the default OpenBOR sound hit. How can I get around this?


2. Weapons

This is emparassing. I can't get weapons to work properly. One hour and a half trying to figure this out. Lame.

I want "jasonh" to turn into "jasonh1" upon picking up "morpher". When testing the game, jasonh desn't pick up morpher, much less turns into jasonh1.

Here's jasonh's header:

name JASONH
type player
weapons  hasonh1 JASONH
weaploss 3

Here's jasonh1's header:

name JASONh1
type none

Here's morpher's header:

name morpher
health 20
type item
subtype weapon
weapnum 1
shadow 1

Here's part of models.txt:
load jasonh data/chars/JASONh/JASONh.txt
load jasonh1 data/chars/JASONh/JASONh1.txt
load morpher data/chars/misc/morpher.txt

I have tried with "know morpher" and... nothing.

3.- Changing the bike's speed after its rider has been knocked down. How?

 
That's perfect, except in this case, where "puttyhit1.wav" plays at the same time as the default OpenBOR sound hit. How can I get around this?

You should silence the latter then.
Simply get a silent .wav and declare this in each attack you don't want default hitfx to play:

hitfx data/sounds/silent.wav

Since this command affects all attackbox in an animation, you can declare this at first frame.

This is emparassing. I can't get weapons to work properly. One hour and a half trying to figure this out. Lame.

I can see the source of embarassment here:

name  JASONH
type  player
weapons  hasonh1 JASONH
weaploss 3

3.- Changing the bike's speed after its rider has been knocked down. How?

Engine bug, has been reported years ago.
If you like, you can use blank frames as biker's PAIN animation and have biker shoot a bike in that animation. You can control speed of shot bike yourself.
 
Bloodbane to the rescue once again!

Bloodbane said:
You should silence the latter then.
Simply get a silent .wav and declare this in each attack you don't want default hitfx to play:

hitfx data/sounds/silent.wav

Genius!

Bloodbane said:
I can see the source of embarassment here:

name  JASONH
type  player
weapons  hasonh1 JASONH
weaploss 3

OK that was pathetic. Sadly is not the cause of the problem (I just checked it with the correct name). By the way, the reason the player wasn't able to pick up that or any other item is because he didn't have a "get" animation, which the manual says it's optional (?). Anyway now he can pick "morpher" but sadly, doesn't get the weapon.

Bloodbane said:
3.- Changing the bike's speed after its rider has been knocked down. How?

Engine bug, has been reported years ago.
If you like, you can use blank frames as biker's PAIN animation and have biker shoot a bike in that animation. You can control speed of shot bike yourself.

Another very good idea. Thanks, man.


AAAAnd another question. How can I control the changes in the mp bar colors? I know about "colormagic", but that's only ONE color, yet during gameplay the bar keeps changing colors as it fills up. That's actually great except that the color change is pretty nonsensical. It goes from bright purple to dark purple to bright again...
 
Bloodbane said:
You should silence the latter then.
Simply get a silent .wav and declare this in each attack you don't want default hitfx to play:

hitfx data/sounds/silent.wav

Since this command affects all attackbox in an animation, you can declare this at first frame.

I was going to try this, but it's not what I'm looking for. That would silence the normal attack sounds for all the attacks regardless of who's getting the hit. What I need is something to assign to the attacked character, not the attacker.

Also I think I'm getting closer to figuring out what's up with the weapons system. It's definitely an issue of the characters and not my engine, something that our friend Cody proved himself during his visit in Angel Groove.



[attachment deleted by admin]
 
How can I control the changes in the mp bar colors? I know about "colormagic", but that's only ONE color, yet during gameplay the bar keeps changing colors as it fills up.

Hmmm... I don't know how to do that with default command but I rather script mp bar myself

By the way, the reason the player wasn't able to pick up that or any other item is because he didn't have a "get" animation, which the manual says it's optional (?). Anyway now he can pick "morpher" but sadly, doesn't get the weapon.

You mean he doesn't change his weapon model?
 
O Ilusionista said:
By the way, the reason the player wasn't able to pick up that or any other item is because he didn't have a "get" animation, which the manual says it's optional (?).
Thanks, I will fix it at the manual as soon as I can.


It is optional, if you don't have weapons.
It means that get animation is not mandatory:
-Spawn animation is optional
-walk and attack animation is mandatory, you can't have a player without those, but you can have a player without get, so it's optional...
 
Problem solved. Apparently the issue was in the weapon's header, which stated:

name  morpher
health  20
type  item
subtype  weapon
weapnum 1
shadow  1

And according to the manual:
item: The entity is a stationary item which can be picked up. Items can only give one bonus per item. In other words, you can't make one item that both gives 2000 points AND gives a 1-up.

D'oh!

Now regarding MP bar colors, can I just deactivate the color change? I mean, I don't understand why it changes colors during gameplay.
 
mersox said:
And according to the manual:
item: The entity is a stationary item which can be picked up. Items can only give one bonus per item. In other words, you can't make one item that both gives 2000 points AND gives a 1-up.

Just FYI, limits like this don't apply when script comes into play. If you are so inclined to add a line or two of script, a single item can confer as many bonuses or whatever else you like.

DC
 
O Ilusionista said:
See the lifebar.txt all the color changes are there. Just use the same values for all the options and the bar won't change the colors.

But that's just for lifebars, isn't it? I don't see any references to mp bars besides colormagic. This is what it says in the file:

#~Determines used color by certain health value. For instance, 'color100' determines
#used color if health is 100 or less.
#~There's no space between "color" and {#} in color{#}.
#~{#} is the health value at which the color will be displayed and its possible values
#are 25, 50, 100, 200, 300, 400 and 500.
#~color500 is also used as the background of the lifebar, and is displayed
#with transparency.
#~If lifebar is displayed in percentage mode (see 'lbarsize' above for info about it), color
#reference changes to:

#color25 = 0-20% health
#color50 = 21-40% health
#color100 = 41-60% health
#color200 = 61-80% health
#color300 = 81-100% health
#color400 and color500 aren't used.

 
OK guys, I REALLY need your help on this one.

After getting the weapon, I want to show a morphing sequence like in the video (minute 2:43)

Mighty Morphing Power Rangers: The movie Stage 1 (Snes)

Two things happen here:
- Everything including other players freeze while the animation plays.
- Not mandatory but desirable: the closeup image appears in the center of the screen regardless of player's coords.

Now this should be easy to achieve with spawnframe and bringing in a text entity. HOWEVER my OpenBOR is from december 2012 and crashes when I use spawnframe. It crashes bad, nothing is written on the log.

I also tried the trick explained in this topic: http://www.chronocrash.com/forum/index.php?topic=1023.msg12165#msg12165
And again it crashed, this time saying that it doesn't recognize the script.

So besides upgrading OpenBOR, is there a way to do this? Did any mod pre-2013 include something like this?
 
mersox said:
Now this should be easy to achieve with spawnframe and bringing in a text entity. HOWEVER my OpenBOR is from december 2012 and crashes when I use spawnframe. It crashes bad, nothing is written on the log.

I made a demo in 2009 using spawn frame, and no problems. So it's clearly something wrong with either your code? Or the spawned entity..,
 
Good to see there's hope. Here's an example of what I do.

Both the spawner and the spawnee work perfectly otherwise. It all goes to hell when I add the lines in red:

name kimberlyh
load shermie
subentity shermie
health 20
mp 20
speed 15
type player
shadow 2
diesound data/CHARS/kimberly/kimdie.wav
riseinv 1 0
makeinv 2 0
weapons  kimberly kimberlyh
jumpheight 3.5
dust dust
noquake 1
atchain 1 2 3
com A2 freespecial2
animationscript data/scripts/randsounmerso.c

anim attack1
spawnframe 1 10 0 0 0
@cmd randSound16 "puncha01.wav" "puncha02.wav" "puncha03.wav" "puncha04.wav" "puncha05.wav" "puncha06.wav" "puncha07.wav" "puncha08.wav" "puncha09.wav" "puncha10.wav" "puncha11.wav" "puncha12.wav" "punchb01.wav" "punchb02.wav" "punchb03.wav" "punchb04.wav"
loop 0
delay 7
bbox 60 58 27 67
offset 57 98 57 98
frame data/chars/kimberlyh/a1-000.gif
bbox 60 58 27 67
attack 60 58 49 67 1 0 0 0 0 0
frame data/chars/kimberlyh/a1-001.gif
bbox 60 58 27 67
attack 0 0 0 0 0
frame data/chars/kimberlyh/a1-000.gif

I have tried with summonframe and custentity as well. I have tried without "load". Nothing.

PS: the title of the thread was changed and know it doesn't make sense. Previously it was an Akira reference :P
 
You're just adding the lines in wrong place, should be more like this -

name  kimberlyh
health  20
mp 20
speed  15
type  player
shadow  2
diesound  data/CHARS/kimberly/kimdie.wav
riseinv 1 0
makeinv 2 0
weapons  kimberly kimberlyh
jumpheight 3.5
dust      dust
noquake 1
atchain 1 2 3
com A2  freespecial2
animationscript data/scripts/randsounmerso.c
load shermie

anim  attack1
subentity shermie
spawnframe 1 10 0 0 0

  @cmd randSound16 "puncha01.wav" "puncha02.wav" "puncha03.wav" "puncha04.wav" "puncha05.wav" "puncha06.wav" "puncha07.wav" "puncha08.wav" "puncha09.wav" "puncha10.wav" "puncha11.wav" "puncha12.wav" "punchb01.wav" "punchb02.wav" "punchb03.wav" "punchb04.wav"
  loop  0
  delay  7
  bbox  60 58 27 67
  offset  57 98  57 98
  frame  data/chars/kimberlyh/a1-000.gif
  bbox  60 58 27 67
  attack  60 58 49 67 1 0 0 0 0 0
  frame  data/chars/kimberlyh/a1-001.gif
  bbox  60 58 27 67
  attack    0 0 0 0 0
  frame  data/chars/kimberlyh/a1-000.gif

--------------------------

- Everything including other players freeze while the animation plays.
You can use this script by DC. http://www.chronocrash.com/forum/index.php?topic=1023.msg9866#msg9866
 
Back
Top Bottom