Scripts / Sticking Particles To Moving Entities.

Author
Message
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 8th Apr 2020 23:38
After watching Lafette II's great video on the soldiers running around on fire, I thought I'd give it a try.

Well after some trial and error I got the particles to stick to the entity and I didn't even crash my computer that many times. LOL

PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 9th Apr 2020 17:57
I stil haven't worked out how to use those particles, i just don't understand them.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 10th Apr 2020 15:57
I actually don't think i'm doing it right, but I've been using this code that seems to work pretty good most of the time.

Spawn(wreck[e])
CollisionOff(wreck[e])
SetPosition(wreck[e],GetEntityPositionX(e),GetEntityPositionY(e),GetEntityPositionZ(e))

at the top of the script use wreck = {}
and below the _init(e) use wreck[e] = the entity # you want to use

you can change the wreck name to anything you like, but the name must match all the code.

I would like to see the code Lafette II was using. it looked like the right way of doing it.



PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 10th Apr 2020 16:00
you can use this code for decals, entities and particles, but with particles there doesn't seem to be an easy way to show and hide like decals and entities.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Apr 2020 23:19
Quote: "but with particles there doesn't seem to be an easy way to show and hide like decals and entities."

StartParticleEmitter(e)
and
StopParticleEmitter(e)

p.s. you don't want to be spawning something every frame
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Apr 2020 00:02
Actually those aren't much use.

Either create and delete emitters as you need them or use the ParticlesSetLife command for fine control of emitters.
Been there, done that, got all the T-Shirts!
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 11th Apr 2020 00:05
Thanks smallg,

For some reason I thought the StartParticleEmitter(e) and StopParticleEmitter(e) was just for the stock GG smoke particle.

I'll give it a try
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Apr 2020 00:33
They are, that's why I said they aren't much use.
Been there, done that, got all the T-Shirts!
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 11th Apr 2020 00:37
Thanks AmenMoses,
I'll see if I can figure out that command in the script.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Apr 2020 01:14
ParticlesDeleteEmitter( emitterId ) is pretty self explanatory.

ParticlesSetLife( emitterId, lifeMin, lifeMax, maxParticles, 0, maxPerFrame ) is the best bet.

Just set maxParticles to 0!

In fact ParticlesSetLife( emitterId, 0, 0, 0, 0, 0 ) should turn off the emitter completely.
Been there, done that, got all the T-Shirts!
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 11th Apr 2020 02:23
Great ! thanks for the help
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 11th Apr 2020 05:10
Is there a separate "wind" option per each emitter?
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 11th Apr 2020 05:18
BTW, @ bluemeenie195, what did you do, throw the "wreck" at the player
to get that flame thrower effect?!
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 11th Apr 2020 11:25
The flame thrower effect is done in the FPE file. I think the Dagored spider uses dagored\raygun for a gun.

Go into that FPE file in gamecore\guns and change it to a projectile.
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 11th Apr 2020 11:34
There is a great thread on how to fool around with projectiles in the FPE file here with Bolt Action Gaming.

https://forum.game-guru.com/thread/220802
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 11th Apr 2020 11:56
Question for smallg, and AmenMoses.

I love that light_npc script that you guys worked on, were you can stick a light were you want on a animated entity and it will lock in place.

Is there a way to do that with entities\ decals ?

That would open up a huge level of game play, were you can quickly place other animated entities, like a spotlight for example to a helicopter and stick it were you want.

That would be awesome, especially for people with nursery school level scripting knowledge like me. LOL

Thanks, Guys
PM

Login to post a reply

Server time is: 2024-04-16 05:24:14
Your offset time is: 2024-04-16 05:24:14