FoodOnCrack
Junior Member
Posts: 5
Threads: 3
Joined: Feb 2014
Reputation:
0
|
Creating Particle, setting different axis?
Hellooo!
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:
void OnStart() { // Area Player Collide Scripts AddEntityCollideCallback("Player", "ScriptArea_1", "BlowWind_1", true, 1); AddEntityCollideCallback("Player", "ScriptArea_2", "BlowWind_2", true, 1); }
void BlowWind_2(string &in asParent, string &in asChild, int alState) { CreateParticleSystemAtEntity("Wind_2", "ps_dust_push.ps", "level_dungeon_1", false); PlaySoundAtEntity("", "guardian_ontop.snt", "level_dungeon_1", 0, false); GiveSanityDamage(5, true); }
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
(This post was last modified: 02-23-2014, 07:52 PM by FoodOnCrack.)
|
|
02-23-2014, 07:50 PM |
|
Wapez
Senior Member
Posts: 360
Threads: 37
Joined: Mar 2012
Reputation:
19
|
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.
|
|
02-23-2014, 07:57 PM |
|
FoodOnCrack
Junior Member
Posts: 5
Threads: 3
Joined: Feb 2014
Reputation:
0
|
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 |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
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 |
|
davide32
Junior Member
Posts: 27
Threads: 6
Joined: Nov 2013
Reputation:
0
|
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 |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
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 |
|
davide32
Junior Member
Posts: 27
Threads: 6
Joined: Nov 2013
Reputation:
0
|
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 |
|
|