Game Development Community

Attaching Particles to Player

by Scott Burns · in Torque Game Engine · 02/05/2004 (3:42 pm) · 25 replies

How do I do it?

Anybody know? Please tell me! Pleeeeeeeeeeeeeeeeease!!!
Page «Previous 1 2
#1
02/05/2004 (5:48 pm)
Try using a ParticleEmitter?
#2
02/06/2004 (1:55 pm)
Yea, I know that part but do you know how you would go about attaching the emitter to the player, or any other object?

I imagine there's source editing and or script writing involved with it, because I am almost positive you can't do it via the Mission/Particle Editors.

Any help would be greatly appreciated. Thanks much.
#3
02/06/2004 (2:19 pm)
Just a wild gues here (never done it myself).. would you "mount" them??
#4
02/06/2004 (2:33 pm)
I think you'd need to add a new field (or array) to the Player object (or whichever object you wanted). The dustEmitter on a player and vehicle is an example of this.

There might be another way to do it - I usually look for something existing that's close to what I want and "reuse" the idea/code.

-Ner
#5
02/06/2004 (2:39 pm)
They have built in classes for this for most shapes. Especially if its a vehicle. Here is a good resource for finding the emitter nodes on a vehicle:

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4273

You can download the game bevaers sample app for a working example of dmage emitters on a car here:
Beaver Patrol

look at \starter.fps\server\scripts\vehcile.cs and car.cs.
#6
02/06/2004 (2:39 pm)
How would you get them to trigger an emission?

I'll give you a brief rundown on what I'm trying to do.

My team and I are creating a kids type game (not really a kids game in the traditional sense, but sort of) and we want to give it a cartoony feel, so when a character runs we would like to create a sort of dust cloud behind them.

Also, any idea how you could set the emitter so that it constantly emits to the back of the player, is there a way to orient the emitter with the player or something?

Keep the suggestions coming, I appreciate them all! =)

Thanks!
#7
02/06/2004 (3:55 pm)
Hi Scott !

I do this with my torches and other things,its not the best
way but it works.
but i tie it to a weapon so when i activate the weapon
i set the stateEmitterTime to 50000 then my torch
is lit the time i want it to .
Maybe not what you want but close :)
#8
02/07/2004 (6:49 am)
Keep the ideas coming please!

Thanks a bunch everyone for the input so far
#9
02/07/2004 (8:04 am)
Alright, I came up with an idea that I think will work. I still need some help though.

The footpuffs are little pust particles that supposedly emit when the player steps, right? Well I gots no footpuffs, and I was wondering how I would get them to emit. I've looked through the source and there's a conditional statement on the creation of them but I don't know what the conditions are!

if(triggeredLeft || triggeredRight)

My assumption is that it's the Left and Right foot, and it's checking to see if one of the feet moved so that it can place the Puff but it's not placing a puff!

Anybody have any idea why I gots no Foot Puffs, and how I can fix that? Please help! Thanks!
#10
02/07/2004 (8:37 am)
Scott
If you see the footmarks on the ground then you must change
the materialmapping

from this
addMaterialMapping( "sand" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" ); 
addMaterialMapping( "patchy" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" ); 
addMaterialMapping( "grass" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" );


to this

addMaterialMapping( "starter.fps/data/terrains/grassland/sand" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" ); 
addMaterialMapping( "starter.fps/data/terrains/grassland/patchy" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" ); 
addMaterialMapping( "starter.fps/data/terrains/grassland/grass" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" );

othervise you cant see any footpuffs
#11
02/07/2004 (9:33 am)
Alright, awesome, thank you.

Is that stuff in the Player.cc file? Or a Script?

I do have the Footprints on the ground.
#12
02/07/2004 (9:56 am)
Umm, I put that in data/terrain/grassland but I still see no puffs =(

Am I missing something here?
#13
02/07/2004 (10:19 am)
Well, I got it working but for some reason it will only work on Stronghold, does anybody have an idea why this might be, and how I could go about making it work on a Custom Map?

Also, thanks everyone for all your help so far. It's much appreciated!
#14
02/07/2004 (11:10 am)
Also, what Particle System does it use when you're walking through water? Is that Splash, Foam, Bubble or SplashMist and does anybody know how I could go about changing it from when you're in water that it emits to when you're on land that it emits?

I'm not sure that made any sense, I'll try to explain it better.

When you're in water you get a trail of particles behind you. I want to know if you can emit that same trail, except on land and which of the 4 particle systems is it? Or is it another one that I haven't even seen?

Thanks much!
#15
02/07/2004 (2:44 pm)
Scott

look in the player.cc there are all emitters from water ground
and moore.
i think there is 4 of them footpuff,decal,dust and splash .
And are you using head version or ?
#16
02/10/2004 (5:52 am)
I'm not sure if I'm using the head version, I might be!

Yea, I saw all the stuff in player.cc and have been messing with it, but I need to get it to emit while over ground instead of water and I imagine that that's in the source code.
#17
02/10/2004 (7:36 am)
Errr, my bad, the .cc is the source (I was thinking .cs) but anyways, I saw a lot of the stuff about the Water emitters and I did what seemed logical to me - did ! on all the conditionals, but that didn't work lol so I'm back in there poking around.

If anybody has any idea let me know please, thanks.
And thanks everybody for all your help thus far, I really appreciate it. =)
#18
02/10/2004 (10:57 am)
Ugh, I'm still having no luck with my "Water Emitter On Land" idea, so I might have to drop it and just go back to the foot puffs. Please don't hesitate to offer as much input as you can on my idea, I want to figure it out if I can but my time for this aspect of the project is running short so unless I get a breakthrough soon it's out and puffs are in.

That said, does anybody have any idea why the Foot Puffs don't work on a custom level? They work great on Stronghold, but any level that I make myself is a no go for Foot Puffs.

Again, please throw as many ideas my way as you can (On both subjects), they're all very much appreciated.

Thanks again!
#19
02/11/2004 (11:50 am)
Still havin problems with the Foot Puffs not showing up in a custom Mission, does anybody know of a possible solution?

Thanks in advance. =)
#20
02/11/2004 (12:12 pm)
If you are using custom textures you need to have a materialMapping defined for those textures. You also need to create and execute the matPropMap.cs file if you have the textures in a new folder.
Page «Previous 1 2