Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 13 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: how to change effect angle?
{PADZ}grimreaper
General Member
Since: Apr 23, 2005
Posts: 334
Last: Aug 11, 2011
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 02:49 pm
Finally managed to add some effects to my new map.
But now i got the problem that after i edit 1 of them in the effect editor the angle is set along the X-axis.
I was wondering how i can change that to to the Z-axis.
In the editor it looks perfect, the water just goes down cause of gravity.

I just added a simple script to my .gsc
Code:
level._effect["shower"] = loadfx ("fire/shower");            
	maps\mp\_fx::loopfx("shower", (640, 153, 432), 3); 

I have read a few other posts about this but i have no clue how to do this.
Every script i ever used is made by someone else so i don't know how to change that either.
Hopefully it's pretty simple.

Thanks in advance.

edited on May. 2, 2010 10:49 am by {PADZ}grimreaper
Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 04:04 pm
I load my FXs in a bit different way. Let me give you an example from my map.
First, you need a mp_mapname_fx.gsc in \raw\maps\mp.
In here I have
Code:
level._effect[ "heli_smoke" ]= loadfx( "smoke/smoke_large" );

Then, create another mp_mapname_fx.gsc in \raw\maps\createfx (you may have to create the folder if it isn't there).
This file contains, among other things
Code:
ent = maps\mp\_utility::createOneshotEffect( "heli_smoke" );
ent.v[ "origin" ] = ( -149, -781.5, 124 );
ent.v[ "angles" ] = ( 270, 0, 0 );
ent.v[ "fxid" ] = "heli_smoke";
ent.v[ "delay" ] = -15;
ent.v[ "soundalias" ] = "fire_metal_large";


A brief explanation:
heli_smoke is the FX id; this name has to be the same in both files;
if your FX is looped, use createOneshotEffect, otherwise use createLoopedEffect (keep in mind that the functions are case sensitive);
you can easily change the origin and angles of the FX;
also, you can add a sound(alias) to the FX.

Don't forget to update your zonefile with these newly created files.
Share |
{PADZ}grimreaper
General Member
Since: Apr 23, 2005
Posts: 334
Last: Aug 11, 2011
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 05:07 pm
Do you mean that i have to use "createOneshotEffect" if i want it looped or not?
Share |
{PADZ}grimreaper
General Member
Since: Apr 23, 2005
Posts: 334
Last: Aug 11, 2011
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 05:22 pm
After about 10 tries with errors the map finally loads but i dont see the effect anymore.
When i first tried it the other way the effect was there but just spraying side ways.
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 05:34 pm
There are many ways to play FX but "cskiller86"'s way should work too. But... some effects don't like to be played the way he does it. Only a few effect refuse to play that way. You can try to add the angles to your existing code, like this.
Code:
level._effect["shower"] = loadfx ("fire/shower");            
	maps\mp\_fx::loopfx("shower", (640, 153, 432), ( 270, 0, 0 ) 3); 
Share |
{PADZ}grimreaper
General Member
Since: Apr 23, 2005
Posts: 334
Last: Aug 11, 2011
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 05:59 pm
Ok somehow that didnt work.
First it gave me an error about the last 3 in that script.
And when i got rid of that it gave me an error of
"type vector is not a float"
which was called for the maps\mp\_fx.gsc

Dont know what happened.
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 07:53 pm
Because if you actually go to the _fx.gsc it says this:

Code:
loopfx(fxId, fxPos, waittime, fxPos2, fxStart, fxStop, timeout)
{
	println("Loopfx is deprecated!");
	ent = createLoopEffect(fxId);
	ent.v["origin"] = fxPos;
	ent.v["angles"] = (0,0,0);
	if (isdefined(fxPos2))
		ent.v["angles"] = vectortoangles(fxPos2 - fxPos);
	ent.v["delay"] = waittime;
}


You can't just throw any old number in and expect it to work. You need to be sure what you are sending to the thread.
As far as this says... you 'cant' choose your own angles... but what you can do... is edit the thread.. and then make sure you include the edited gsc in the map.

Something like this:

Code:
loopfx(fxId, fxPos, waittime, fxPos2, fxStart, fxStop, timeout, angles)
{
	if(!isDefined(angles))
		angles = (0,0,0);
	println("Loopfx is deprecated!");
	ent = createLoopEffect(fxId);
	ent.v["origin"] = fxPos;
	ent.v["angles"] = angles;
	if (isdefined(fxPos2))
		ent.v["angles"] = vectortoangles(fxPos2 - fxPos);
	ent.v["delay"] = waittime;
}


From what i've noticed, the thread reads the variables from left to right.. (fxId, fxPos, waittime, fxPos2, etc.)
So i put the new variable at the very end. I'm sure other threads use it... so you don't want to mess it up... I mentioned if it wasn't defined then make it defined as (0,0,0) like it originally was.

Onto the next thing... you have to make sure you call the thread correctly.

Code:
maps\mp\_fx::loopfx("shower", (640, 153, 432), 3, undefined, undefined, undefined, undefined, (270, 0, 0));

Should work.

edited on May. 2, 2010 03:55 pm by _INSANE_
Share |
{PADZ}grimreaper
General Member
Since: Apr 23, 2005
Posts: 334
Last: Aug 11, 2011
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 09:20 pm
Wow iam in over my head here.
That is like a doctors hand writing.
Are you saying i have to edit the pre excisting _fx.gsc?
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Sunday, May. 2, 2010 09:34 pm
Yep [pimp]

Either that.... or define fxPos2 ...and then it will change the angles by relating it to fxPos and fxPos2

edited on May. 2, 2010 05:35 pm by _INSANE_
Share |
{PADZ}grimreaper
General Member
Since: Apr 23, 2005
Posts: 334
Last: Aug 11, 2011
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Monday, May. 3, 2010 02:36 pm
Changing that original script,
won't that effect the other things?
And will it work for whoever downloads my map of a server?
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»