Rotate FX

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Rotate FX

Post by Soviet » August 13th, 2008, 12:02 am

I have an effect I want to face a different direction. After some research I found out you could theoretically do that with the mp_yourmap_fx.gsc file in a createfx folder in raw/maps. However, I made it, added the angles I wanted to change, and it doesn't change.

mp_yourmap_fx.gsc

Code: Select all

//_createfx generated. Do not touch!!
main()
{
			ent = maps\mp\_utility::createOneshotEffect( "hover" );
			ent.v[ "origin" ] = ( -416, 0, 160 );
			ent.v[ "angles" ] = ( 270, 0, 0 );
			ent.v[ "fxid" ] = "hover";
			ent.v[ "delay" ] = -15;
}
The 270 in the x there for angles should rotate it but it doesn't

and normal gsc

Code: Select all

	level._effect["hover"] = loadfx ("fire/hover");            
	maps\mp\_fx::loopfx("hover", (-416, 0, 160), 3);  
anybody have any idea what's wrong?
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Rotate FX

Post by Drofder2004 » August 13th, 2008, 12:20 am

PlayLoopedFX( <effect id>, <repeat delay>, <position>, <cull distance>, <forward>, <up> )

<cull distance> - Set to 0 for now
<forward> - try (1, 0, 0)
and do not use <up>

Let me know if that works, fx used to be <direction> but that has been scrapped I think.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: Rotate FX

Post by Soviet » August 13th, 2008, 5:19 am

I'm assuming I create a thread for it and take the other stuff out. I did, but I get an error

Code: Select all

test()
{
	hover = loadfx ("fire/hover"); 
while(1)
{
	PlayLoopedFX( hover, 15, (-416, 0, 160), 0, ( 1, 0, 0 ), ( 0, 0, 0 ));
}
}
error:

Code: Select all

G_Spawn: no free entities
wtf?
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: Rotate FX

Post by Soviet » August 13th, 2008, 5:07 pm

I have 2 entities.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Rotate FX

Post by Drofder2004 » August 13th, 2008, 7:14 pm

You are looping a looped FX.

In other words, you are creating an infinite amount of FX.
Get rid of the while.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: Rotate FX

Post by Soviet » August 13th, 2008, 7:47 pm

the fx shows up, but it is in the exact same place as always.

edit: Got it working with the createfx/_fx.gsc file bullshit. Had to do it exactly as the lightning and thunder tutorial in the tutorial forum with the extra .gsc file though. Fucking terrible tbh, things shouldn't have to be so exact.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests