spawning an entity during animation of another entity
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
spawning an entity during animation of another entity
Hello,
I need your help with my current problem.
As you know, in Mission Pack 2, there are the phantom swords.
What I want to do is call the knights death animation during the phantom sword death animation.
To be more specific:
After the swords 2nd frame death animation, I want to spawn in the knight´s death animation.
My problem so far:
When I call “knight_die ();” inside the 2nd frame of the sword, the sword will vanish and only the knight death animation is visable:
I guess it is, because they both are on the same origin/position ? (so they disturb each other ?)
Make the knights call during the 4th sword frame does the same (so the "solid_not") doesnt help.
I tried to call both animations at the same time:
knight_die ();
sword_die ();
That will result in both models become almost transparent (barely visable).
What is the trick to spawn an entity/animation while another entities animation is still ongoing ?
Thank you very much for your help.
Kind regards,
Seven
I need your help with my current problem.
As you know, in Mission Pack 2, there are the phantom swords.
What I want to do is call the knights death animation during the phantom sword death animation.
To be more specific:
After the swords 2nd frame death animation, I want to spawn in the knight´s death animation.
My problem so far:
When I call “knight_die ();” inside the 2nd frame of the sword, the sword will vanish and only the knight death animation is visable:
- Code: Select all
void() sword_die1 =[ $death1, sword_die2 ] {};
void() sword_die2 =[ $death2, sword_die3 ] {
knight_die ();};
void() sword_die3 =[ $death3, sword_die4 ]
{self.solid = SOLID_NOT;};
void() sword_die4 =[ $death4, sword_die5 ] {};
...
I guess it is, because they both are on the same origin/position ? (so they disturb each other ?)
Make the knights call during the 4th sword frame does the same (so the "solid_not") doesnt help.
I tried to call both animations at the same time:
knight_die ();
sword_die ();
That will result in both models become almost transparent (barely visable).
What is the trick to spawn an entity/animation while another entities animation is still ongoing ?
Thank you very much for your help.
Kind regards,
Seven
- Seven
- Posts: 301
- Joined: Sat Oct 06, 2007 8:49 pm
- Location: Germany
Re: spawning an entity during animation of another entity
you need spawn a new entity
you can call this function where you want!
- Code: Select all
void() Becomedeathknight =
{
local entity deathknight;
deathknight = spawn();
deathknight.origin = self.origin;
deathknight.movetype = MOVETYPE_TOSS;//
deathknight.velocity = '0 0 0';
deathknight.touch = SUB_Null;
setmodel (deathknight, "progs/knight.mdl");
deathknight.nextthink = time + 0.1;
deathknight.think = knight_die1;
};
you can call this function where you want!
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
Re: spawning an entity during animation of another entity
- Code: Select all
void() sword_die1 =[ $death1, sword_die2 ] {};
void() sword_die2 =[ $death2, sword_die3 ] {
Becomedeathknight ();};
void() sword_die3 =[ $death3, sword_die4 ]
{self.solid = SOLID_NOT;};
void() sword_die4 =[ $death4, sword_die5 ] {};
...
I think it will work (not tested)
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
Hello Nahuel,
Thank you very much for your fast answer.
I will try it this evening.
You are a very big help for my tiny project.
Your tuto with the ".float alpha;" and the fading animation looks very nice for the knight spawn.
I will try to get it running together.
My only concern is, that the spawned knight will be stack ontop of the sword, cause they have the same origin and the knight comes after the sword.
Thank you again !
Seven
Thank you very much for your fast answer.
I will try it this evening.
You are a very big help for my tiny project.
Your tuto with the ".float alpha;" and the fading animation looks very nice for the knight spawn.
I will try to get it running together.
My only concern is, that the spawned knight will be stack ontop of the sword, cause they have the same origin and the knight comes after the sword.
Thank you again !
Seven
- Seven
- Posts: 301
- Joined: Sat Oct 06, 2007 8:49 pm
- Location: Germany
They don't stack. It actually looks pretty good.
If you are worried about them stacking due to the corpses going solid (gibbable) - that shouldn't be a issue as the 2 corpses - sword and knight - only one should be able to be gibbed. The Knight - the sword shouldn't gib.
If you are worried about them stacking due to the corpses going solid (gibbable) - that shouldn't be a issue as the 2 corpses - sword and knight - only one should be able to be gibbed. The Knight - the sword shouldn't gib.
- ooppee
- Posts: 70
- Joined: Thu Oct 28, 2010 2:57 am
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest