Page 1 of 1

Rotate FX

Posted: August 13th, 2008, 12:02 am
by Soviet
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?

Re: Rotate FX

Posted: August 13th, 2008, 12:20 am
by Drofder2004
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.

Re: Rotate FX

Posted: August 13th, 2008, 5:19 am
by Soviet
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?

Re: Rotate FX

Posted: August 13th, 2008, 5:07 pm
by Soviet
I have 2 entities.

Re: Rotate FX

Posted: August 13th, 2008, 7:14 pm
by Drofder2004
You are looping a looped FX.

In other words, you are creating an infinite amount of FX.
Get rid of the while.

Re: Rotate FX

Posted: August 13th, 2008, 7:47 pm
by Soviet
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.