Frictional Games Forum (read-only)

Full Version: Lights on a custom enemy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I would like help with putting lights on an enemy please. Angel

I'm using a brute as a placeholder for my custom enemy that has searchlights in his chest. My problem is that the lights I put in the model editor isn't moving with the brute when he moves. Is there a way to connect the lights & billboards so they'll be in place on the chest while the brute is moving or do I have to put up with the stationary lights until I make my final model with all the animated goodness?

Or is it even possible to do this with an animated entity?

Edit: Also, when I put my placeholder in my map, the lights appear in the corner of the room I start in. Not on the brute which is really far away. Sad Is there a way to fix this also? The corner is at 0,0,0 if that helps.

Edit2: MegaScience just answered my question so this thread can be deleted by an admin seeing I don't have the authority.
You should attach the light and/or billboard and/or particles to a bone. In model editor.
For example you an look at this: http://www.moddb.com/mods/white-night/im...ng-monster
Can the fire be turned on and off independently of the monster? :o
I don't know, I couldn't manage that. And there is one another problem, when monster is deactivated or faded into smoke, those particles stays and floats in the air.
Well, what's the name of the particle system(s) used? You might just be able to turn them off that way. Smile
entityname_bonename_lightname should work to turn the light/on off with script.

example: if the monster is called MyMonster and the bone is NeckBone and the light is called "Light_1" SetLightActive (or whatever the script is named) should be SetLightActive("MyMonster_NeckBone_Light_1", false);

At least this is how it works when you attach stuff to bodies in entities, can't recall having tested it with bones though.
(09-07-2011, 03:59 PM)jens Wrote: [ -> ]entityname_bonename_lightname should work to turn the light/on off with script.

example: if the monster is called MyMonster and the bone is NeckBone and the light is called "Light_1" SetLightActive (or whatever the script is named) should be SetLightActive("MyMonster_NeckBone_Light_1", false);

At least this is how it works when you attach stuff to bodies in entities, can't recall having tested it with bones though.
Actually I've been wondering, how far does this functionality go? Are you able to access the entity type properties, like the grunt's speed and such?
These can be changed from user variables or whatever they are called. What Tan is referring to is something different and I have had trouble with it as well.

Tan: does the idea Jens gave us work?
Nope, it didn't work. I guess bones are not accessible through script like bodies are.
(09-07-2011, 04:22 PM)plutomaniac Wrote: [ -> ]These can be changed from user variables or whatever they are called. What Tan is referring to is something different and I have had trouble with it as well.

I meant variably changing them in-game through scripting, like changing bodies.
Pages: 1 2