effects on demand
Moderator: Core Staff
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
Yep, that's it.
play loopeffect....stop effect when triggered....wait 60 seconds......then play the loopeffect again.
(it's for the spawneffect of the weapons in deck16)
Can't seem to figure it out.
play loopeffect....stop effect when triggered....wait 60 seconds......then play the loopeffect again.
(it's for the spawneffect of the weapons in deck16)
Can't seem to figure it out.
Re: effects on demand
If i remember correct, the weapons only spawn with some kind of a light fx, not loopfx until its picked up.
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
That's right but in CoD2 the weapons are very small compared to the weapons in UT, so they are harder to spot.
Just to make em more noticible I want to add a small effect.
Just to make em more noticible I want to add a small effect.
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: effects on demand
Code: Select all
main()
{
level.THIS_WEAPON_picked_up = false; //change to the weapon you want
thread triggeredLoopFX();
thread pickupWeapon();
}
triggeredLoopFX()
{
fx = loadfx("blah");
o = getent("origin_blah","targetname");
while(!level.THIS_WEAPON_picked_up)
{
playfx(fx, o.origin);
wait 0.5;
}
}
pickupWeapon()
{
t = getent("trigger_blah","targetname");
for(;;)
{
t waittill("trigger", user);
//do stuff
level.THIS_WEAPON_picked_up = true;
wait 60;
//respawn weapon
level.THIS_WEAPON_picked_up = false;
thread triggeredLoopFX();
}
}
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
Thx, m8. I'll test it when I get home today.
Finally I can finish my map
On to the next one... Spacenoxxx
Finally I can finish my map

On to the next one... Spacenoxxx
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
I tried the code and this is what happends (get no error btw);
- the loopfx plays (stays looped untill triggered)
- when I trigger the ..uhm...trigger the fx dies out (like it wasn't looped)
- weapon spawns after 60 sec but fx doesn't
- the loopfx plays (stays looped untill triggered)
- when I trigger the ..uhm...trigger the fx dies out (like it wasn't looped)
- weapon spawns after 60 sec but fx doesn't
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: effects on demand
Code: Select all
main()
{
level.THIS_WEAPON_picked_up = false; //change to the weapon you want
thread triggeredLoopFX();
thread pickupWeapon();
}
triggeredLoopFX()
{
fx = loadfx("blah");
o = getent("origin_blah","targetname");
while(1)
{
if(!level.THIS_WEAPON_picked_up)
{
playfx(fx, o.origin);
wait 0.5;
}
wait 0.05;
}
}
pickupWeapon()
{
t = getent("trigger_blah","targetname");
while(1)
{
t waittill("trigger", user);
//do stuff
level.THIS_WEAPON_picked_up = true;
wait 60;
//respawn weapon
level.THIS_WEAPON_picked_up = false;
thread triggeredLoopFX();
}
}
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
It still doesn't remove the effect, shouldn't this be done with a delete(); command or something ?
It spawns the effect after 60 seconds though.
It spawns the effect after 60 seconds though.
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: effects on demand
Remove thread triggeredLoopFX(); in the last line.
? Surely if it's spawned again it has to be removed.It still doesn't remove the effect,[...]It spawns the effect after 60 seconds though.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
did it but got the same result.
What I mean by it respawns is;
- when I trigger the trigger (pick up weapon).
- the effect is (I think) played again but not looped. The effect destroys itself after 20 seconds or so and then respawns after 60 seconds (what's in the script)
What I mean by it respawns is;
- when I trigger the trigger (pick up weapon).
- the effect is (I think) played again but not looped. The effect destroys itself after 20 seconds or so and then respawns after 60 seconds (what's in the script)
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: effects on demand
I tested the code I posted myself(without the last line), it works like it should, or at least it does what you said you wanted it to do.
http://www38.zippyshare.com/v/19328532/file.html
See for yourself. Run mp_effect_test in deathmatch and press the trigger.
http://www38.zippyshare.com/v/19328532/file.html
See for yourself. Run mp_effect_test in deathmatch and press the trigger.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
You are right m8. I used the print text lines in my script and it works like it should (scripting wise).
Finally figured out the problem (I think), the effect has some sort of fall off curve. I changed the life-time of the effect and now it works. Still has a little bit of fall off curve, but I can live with that.
Thx for all the effort m8 !
Finally figured out the problem (I think), the effect has some sort of fall off curve. I changed the life-time of the effect and now it works. Still has a little bit of fall off curve, but I can live with that.
Thx for all the effort m8 !
Re: effects on demand
Do morpheus next! 

-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: effects on demand
BatterY wrote:Do morpheus next!


Who is online
Users browsing this forum: No registered users and 1 guest