I want to know if it is possible to use game particles and spawn them at specific coordinates for a specific time aand stuff, as I would like to use that new Rocket Particles for my Supply Signals.
Using game particles / effects (C#)
Discussion in 'Rust Development' started by LaserHydra, Apr 24, 2015.
-
You mean rocket entity and controll it via plugin?
-
no that also would be cool but no. I just need the particles of the rocket. Without the rocket itself.
-
@LaserHydra
The small gas explosion actually looks way cooler
global.Effect.server.Run.methodarray[3]:Invoke(nil, util.TableToArray( { "fx/gas_explosion_small", player.transform.position, UnityEngine.Vector3.get_up(), nil, true } ) ) -
where actually should I put in the variable for the coordinates now? ^^ Its kinda not easy to find the right part of this long command
-
-
Thats the only thing I needed. Thanks
And actually the timer is exactly 3.2 Seconds ^_^ -
-
Okay one last question to that. Does it play an explosion once? Because I would like to do it like a flare or the nades in legacy, so it actually smokes for some while and then stops smoking after like 10 seconds
[DOUBLEPOST=1429901061][/DOUBLEPOST] -
-
[DOUBLEPOST=1429912191,1429901243][/DOUBLEPOST] -
You can grab all effects from any item. Just create an item entity and run through em.
-
Lets use the example of the rocket.
So what do I need To do to get the effectName?
In the decompiled data, I didnt even find the RocketEntity itself ^^Last edited by a moderator: Apr 25, 2015 -
Just dump the string in the GameManifest, this will print out all RPCMessages, effects, ....... All the effects have fx in their name.
Code:namespace Oxide.Plugins { [Info("GameManifest dumper", "Mughisi", 1.0)] class GameManifestDump : RustPlugin { void Loaded() { foreach (GameManifest.PooledString str in GameManifest.Get().pooledStrings) Puts(str.str); } }}
-
-
-
okay and how does it tell me the effects?
[DOUBLEPOST=1429978522][/DOUBLEPOST]
Thanks
[DOUBLEPOST=1429991377,1429978452][/DOUBLEPOST]Is it possible to modify its size? -
I tried a bit, but wasnt able to find a way to do this in C#.
How does this work in C#? Please Help...
- Laser -
Hello, I wanted to spawn some effects / particles in. I know how it works in LUA, but I wanna do it in C# now, and Im a bit stuggling to do that.
LUA:Code:global.Effect.server.Run.methodarray[3]:Invoke(nil, util.TableToArray( { "fx/weapons/vm_rocket_launcher/pfx_fire_rocket_smokeout", player.transform.position, UnityEngine.Vector3.get_up(), nil, true } ) )
Code:public static void Run(Effect.Type fxtype, BaseEntity ent, uint boneID, Vector3 posLocal, Vector3 normLocal, Connection sourceConnection = null, bool broadcast = false) { Effect.reusableInstace.Init(fxtype, ent, boneID, posLocal, normLocal, sourceConnection); Effect.reusableInstace.broadcast = broadcast; EffectNetwork.Send(Effect.reusableInstace); } public static void Run(string strName, BaseEntity ent, uint boneID, Vector3 posLocal, Vector3 normLocal, Connection sourceConnection = null, bool broadcast = false) { Effect.reusableInstace.Init(Effect.Type.Generic, ent, boneID, posLocal, normLocal, sourceConnection); Effect.reusableInstace.pooledString = strName; Effect.reusableInstace.broadcast = broadcast; EffectNetwork.Send(Effect.reusableInstace); } public static void Run(Effect.Type fxtype, Vector3 posWorld, Vector3 normWorld, Connection sourceConnection = null, bool broadcast = false) { Effect.reusableInstace.Init(fxtype, posWorld, normWorld, sourceConnection); Effect.reusableInstace.broadcast = broadcast; EffectNetwork.Send(Effect.reusableInstace); } public static void Run(string strName, Vector3 posWorld = default(Vector3), Vector3 normWorld = default(Vector3), Connection sourceConnection = null, bool broadcast = false) { Effect.reusableInstace.Init(Effect.Type.Generic, posWorld, normWorld, sourceConnection); Effect.reusableInstace.pooledString = strName; Effect.reusableInstace.broadcast = broadcast; EffectNetwork.Send(Effect.reusableInstace); } }
-
Use the last one as its the one you were using in Lua..