Jump to content
Sign in to follow this  
bigshotking

Is it possible to select a spcific part of an object?

Recommended Posts

I'm not sure what I'm going to do with this idea of mine but here it is. I'm trying to simulate a oil Derrick Fire by having fire spawn at the top of it to make it look like it burning all the oil that is being pumped up. Right now its trial and error trying to get the height right and the position of the gamelogic to where it is centered at the top of the derrick, and at the correct height. So is there anyway to select the tower of the direct so that I can spawn a gamelogic on it?

Thanks for any help!

Share this post


Link to post
Share on other sites

Use attachTo I guess? Still might need to play around depending on where the [0,0,0] point is though.

Share this post


Link to post
Share on other sites

Hmm, good point. Never thought of using the attach to command for this, I'll experiment with it tonight and see if it yields beefed results.

Thanks

Share this post


Link to post
Share on other sites

Fascinating. I did this 2 weeks ago for a smoke stack http://www.azcoder.com/images/smokestack.jpg

I basically did what you wrote, game logic and lots of guessing. I used a in-game camera to move around and verify until I got it right.

Just for fun I tried it with attachTo as Kylania mentioned. This required 2 game logics. The first one gets associated with the object (stack, oil well, whatever), the second one is for the fire.

On the map editor, zoom in close, click ID's and get the number for your oil well. For my smokestack it's 16355. In the game logic initialization:

FIRESTACK = position this nearestObject 16355

For the other game logic, I called FIRE, put it anywhere and attach it to the first:

this attachTo [FIRESTACK,[0,0,20]]

Spawn a fire

[FIRE, 5, time, false, true] spawn BIS_Effects_Burn;

You still have to guess the altitude, but at least the x-y is centered.

Now, you *can* burn the first game logic of course, but I was not able to move it, always burned right in the middle. That's why I used a second logic. HTH :)

Share this post


Link to post
Share on other sites

IMHO modelToWorld is the most reliable command to use in these kind of situations, though making use of attachTo is basically the same.

Just sayin' for you don't really need a game logic to spawn some particles, the correct position is enough.

Share this post


Link to post
Share on other sites

Interesting, but I'm trying to use the attach to command. Is it possible to even get the direction of the object?

Share this post


Link to post
Share on other sites

Ruebe: The BIS_Effects_Burn function requires an object passed to it, so lighting a game logic on fire seemed like the easiest solution. Of course you can create the particles yourself, or rewrite the burn function to use positions instead of objects.

bigshotking: when you retrieve the object with the game logic as I showed, you can do a getDir on it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×