Page 1 of 2
InsertEvent
Posted: Thu Oct 09, 2008 5:10 pm
by Danimita92
Hello everybody, I'm asking this by request of Zidane, because he didn't know how to formulate this question, seeing as Spanish is his main language.
Thing is he was trying to match his scripted player's "step" sounds match the actual steps. Then he saw the game "Forged in Fire" and checked its scripts. There he saw the commands InsertEvent, SaveActor, etc.
He made a script that added these events, but RF crashed. He commented the whole script and found out that the error's in the InsertEvent command. How come?
Script:
Code: Select all
{
Spawn[()
{
Console(true);
LowLevel("setup");
}]
setup[()
{
InsertEvent("Walk","S",0.2);
InsertEvent("Walk","S",0.6);
SaveActor("jol.act");
HighLevel("Done");
}]
Done[()
{
Remove(true);
}]
}
Re: InsertEvent
Posted: Thu Oct 09, 2008 10:32 pm
by Zidane
Any help?
Re: InsertEvent
Posted: Thu Oct 09, 2008 11:04 pm
by Allanon
Does the actor have an animation named "Walk"?
Re: InsertEvent
Posted: Thu Oct 09, 2008 11:11 pm
by Zidane
Yes
Re: InsertEvent
Posted: Sat Oct 11, 2008 8:11 pm
by Danimita92
Bump
Re: InsertEvent
Posted: Thu Oct 16, 2008 6:03 pm
by Zidane
Anybody can try use the InsertEvent command?
Re: InsertEvent
Posted: Thu Oct 16, 2008 9:14 pm
by Juutis
Tested it.
It seems RF crashes if the first parameter of InsertEvent() isn't an animation of the actor. Make sure you type it right.
Re: InsertEvent
Posted: Thu Oct 16, 2008 10:38 pm
by Zidane
Thanks Juutis, but "Walk" animation is correct. I don't know what happend

Re: InsertEvent
Posted: Wed Oct 22, 2008 2:12 pm
by Juutis
I'm afraid the only way I can make it crash is to have a wrong animation name. Make sure it's
exactly the same as the animation name. IE. Walk != walk != WALK. What version are you using, BTW?
Oh, and sorry for being a slow poster. That's just the way I am.

Re: InsertEvent
Posted: Wed Oct 22, 2008 3:24 pm
by Zidane
Yes , the name is correct

.... "Walk"
The version is 0.75 with NGD
Re: InsertEvent
Posted: Wed Oct 22, 2008 3:35 pm
by Juutis
Zidane wrote:Yes , the name is correct

.... "Walk"
The version is 0.75 with NGD
Alright, could be the version. I tested it in 076.
Re: InsertEvent
Posted: Wed Oct 22, 2008 3:57 pm
by Zidane
Aha, I will test in 0.76
Re: InsertEvent
Posted: Wed Oct 22, 2008 5:02 pm
by Zidane
Ops, with RF 0.76 crash too. In the picture you can see the log, the model, the script and the anim "Walk".

Any idea?
Re: InsertEvent
Posted: Wed Oct 22, 2008 5:21 pm
by Juutis
Oh wow, I hate to say this but I'm all out of ideas here.
But your goal is to match the step sounds with the actual animation, right? Couldn't you just use a timer or something? I mean every time the player starts the 'Walk' animation wait for 0.2 seconds, play the sound, wait for 0.4 seconds, play the sound again and repeat.
Re: InsertEvent
Posted: Wed Oct 22, 2008 5:31 pm
by Zidane
Yes my goal is match the step sounds , attack sounds , etc.
I tried timer and self.time before, is a good option, but it have a problem:
If the player is face to a heavy zone of the map ,the steps sounds play fast,otherwise play slow.... depending of the framerate.
Then i thinked in the InsertEvent command, but i dont understand wath happend with it