Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Creating Particle, setting different axis?
FoodOnCrack Offline
Junior Member

Posts: 5
Threads: 3
Joined: Feb 2014
Reputation: 0
#1
Wink  Creating Particle, setting different axis?

Hellooo! Tongue

I am working busy on my second custom story (i threw away my first one) And i want to create a particle system and a sound at an entity when i enter a specific area. It turned out good the first time without errors, but the unfortunate thing, the orientation of the particle system is incorrect. I created a ps_dust_push at a level door but it is 90 degrees off.

Here is my code:

PHP Code: (Select All)
void OnStart()
{
// Area Player Collide Scripts
    
AddEntityCollideCallback("Player""ScriptArea_1",  "BlowWind_1"true1);
    
AddEntityCollideCallback("Player""ScriptArea_2",  "BlowWind_2"true1);
}


void BlowWind_2(string &in asParentstring &in asChildint alState
{
    
CreateParticleSystemAtEntity("Wind_2""ps_dust_push.ps""level_dungeon_1"false);
    
PlaySoundAtEntity("""guardian_ontop.snt""level_dungeon_1"0false);
    
GiveSanityDamage(5true);



Is there another way of scripting this or doing something different in the level editor? Thank you!

PS. I'm looking for Alpha/Beta testers to play my custom story Smile
(This post was last modified: 02-23-2014, 07:52 PM by FoodOnCrack.)
02-23-2014, 07:50 PM
Find
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#2
RE: Creating Particle, setting different axis?

Turn the area you are spawning the particle on around, so it's facing the way you want the particle to face. There's no way of seeing this in the level editor, (might be positive X axis), but you can try it out in game.

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
02-23-2014, 07:57 PM
Find
FoodOnCrack Offline
Junior Member

Posts: 5
Threads: 3
Joined: Feb 2014
Reputation: 0
#3
RE: Creating Particle, setting different axis?

(02-23-2014, 07:57 PM)Wapez Wrote: Turn the area you are spawning the particle on around, so it's facing the way you want the particle to face. There's no way of seeing this in the level editor, (might be positive X axis), but you can try it out in game.

I feared that, it is a level door which can't be turned. (it can but that would look very stupid.)
How about creating a script area on the door and setting the particle system on that?
02-23-2014, 09:39 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Creating Particle, setting different axis?

Well, you can use a PlayerStartArea type when placing it. They show the local axises of the area. If it uses positive X, then that'd be the blue arrow. After that you can just change the area type back to ScriptArea.

02-23-2014, 09:45 PM
Find
davide32 Offline
Junior Member

Posts: 27
Threads: 6
Joined: Nov 2013
Reputation: 0
#5
RE: Creating Particle, setting different axis?

You can use a SetEntityActive("YourArea", true);
if true you make the Entity or areas active if false inactive
02-23-2014, 10:13 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Creating Particle, setting different axis?

(02-23-2014, 10:13 PM)davide32 Wrote: You can use a SetEntityActive("YourArea", true);
if true you make the Entity or areas active if false inactive

That is correct, but you might've misunderstood what was asked. OP was wondering how to rotate a scripted particle system.

02-24-2014, 12:08 AM
Find
davide32 Offline
Junior Member

Posts: 27
Threads: 6
Joined: Nov 2013
Reputation: 0
#7
RE: Creating Particle, setting different axis?

yes but if you want to rotate the PS to some different axis you can use over a SetEntityActive of an area+ but I think the script is RotatePropToSpeed applied of a particle system to rotate the PS in a different axis, but i'm not sure for it does it work I try it if does it work i give you the hps file
(This post was last modified: 02-24-2014, 01:51 PM by davide32.)
02-24-2014, 01:48 PM
Find




Users browsing this thread: 1 Guest(s)