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?

 
Hey guys... it's me again...

I have been trying to use spawn01 and no luck. I have script.c in the scripts folder. The char's file reads:

name kimberly

health 20
mp 20
speed 15
type player
shadow 2
diesound data/CHARS/pink_ranger/kimdie.wav
riseinv 1 0
makeinv 2 0
weapons  pink_ranger kimberly
jumpheight 3.5
dust dust

throwdamage 1
noquake 1
atchain 1 2 3

com A2 freespecial2


load morphbolt


animationscript data/scripts/randsounmerso.c
animationscript data/scripts/script.c

anim attack1

@cmd spawn01 "morphbolt" 1 1 1


@cmd randSound2  "kimshortb.wav" "kimshortc.wav" "kimshortf.wav" "kimshortg.wav" "kimshort02.wav" "kimshort06.wav"
@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/kimberly/a1-000.gif
bbox 60 58 27 67
attack 60 58 49 67 1 0 0 0 0 0
frame data/chars/kimberly/a1-001.gif
bbox 60 58 27 67
attack 0 0 0 0 0
frame data/chars/kimberly/a1-000.gif

Any ideas?
 
Hey guys... it's me again...

I have been trying to use spawn01 and no luck. I have script.c in the scripts folder. The char's file reads:

name kimberly

health 20
mp 20
speed 15
type player
shadow 2
diesound data/CHARS/pink_ranger/kimdie.wav
riseinv 1 0
makeinv 2 0
weapons  pink_ranger kimberly
jumpheight 3.5
dust dust

throwdamage 1
noquake 1
atchain 1 2 3

com A2 freespecial2


load morphbolt


animationscript data/scripts/randsounmerso.c
animationscript data/scripts/script.c

anim attack1

@cmd spawn01 "morphbolt" 1 1 1


@cmd randSound2  "kimshortb.wav" "kimshortc.wav" "kimshortf.wav" "kimshortg.wav" "kimshort02.wav" "kimshort06.wav"
@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/kimberly/a1-000.gif
bbox 60 58 27 67
attack 60 58 49 67 1 0 0 0 0 0
frame data/chars/kimberly/a1-001.gif
bbox 60 58 27 67
attack 0 0 0 0 0
frame data/chars/kimberly/a1-000.gif

The log reads:
Can't compile script!

Any ideas?
 
You  can declare only 1 animationscript on entity header.

To use that spawn1 function, I suggest you to open script.c file and put this on the first line of the file:

#include "data/scripts/randsounmerso.c"

Then,  remove that "animationscript data/scripts/randsounmerso.c" from the entity header.
 
Maybe try to use  projectile command, im using it to spawn effects on many frames @cmd projectile 1 "spark" -15 0 -5
You have to figure out what values to use , -15 0 -5 are  x z y  and theres 2 more so can be @cmd projectile 1 "spark" -15 0 -5 1 1 but you have to check what the last numbers do, i cant find documentation on this and this command is hardcoded so you dont need anything else to make it work, i know one of the last numbers decides if you want it to moving or not.
 
Awesome, thank you!

EDIT:
I was trying find this other thing by myself but after 30 min decided what the hell, it doesn't hurt to ask. What if I have multiple spawn01's and I want them to appear one after the other and not all at the same time? Like:

@cmd spawn01 "morphbolt" 1 1 1
@cmd spawn01 "morphtommy" 1 1 1
@cmd spawn01 "morphtommy_o" 1 1 1
@cmd spawn01 "morphzack" 1 1 1
@cmd spawn01 "morphkim" 1 1 1

Etc, etc.

My plan is to call all of them and kill the unneeded ones with killentity based on the active characters, plus other stuff but i think (hope) i can figure those out myself.
 
Simple, just spawn them in order like this:
delay 20
@cmd spawn01 "morphbolt" 1 1 1
frame ...
@cmd spawn01 "morphtommy" 1 1 1
frame ...
@cmd spawn01 "morphtommy_o" 1 1 1
frame ...
@cmd spawn01 "morphzack" 1 1 1
frame ...
@cmd spawn01 "morphkim" 1 1 1
frame ...

You'll be spawning them with 20 centisecond period.
 
Back
Top Bottom