Jump to content
Sign in to follow this  
88mike

Attach game logic to moving object

Recommended Posts

Let me start off by saying I'm somewhat new to scripting but I'm learning how as I go. I've looked absolutely everywhere to find out how to attach a game logic to a moving object. What I'm trying to do is attach a game logic to the assembled device so I can move a nuke anywhere on the map using panda's nuke mod. I've tried attachTo but that's not working and I've tried getPos setPos on a trigger with out much luck either. Also I've tried to get around using a game logic and sync'd the module strait to the device. No luck there either.  Any ideas or help would be greatly appreciated, I'm stuck.

 

88Mike

Share this post


Link to post
Share on other sites

Not sure if a GL can be attached or not, but for sure it can be setPos'ed... If it is not working for you, probably the thing is the mod for some reason does not work well with a moved GL.

 

You can debug easily if a GL is moved byt setPos'ing it, and then player setPos (position GL);

Share this post


Link to post
Share on other sites

I know for sure that an object can be attached to a game logic.

s2 attachTo [player,[0,0,0]]

s1 = GL

Share this post


Link to post
Share on other sites

I'll give setPos another look. It may be the mod just won't allow it. You guys have given me a couple of ideas. Thanks for the incite.

 

88Mike

Share this post


Link to post
Share on other sites

After watching YouTube videos on installing the mod I had decided that detonation would occur at the game logic.  That was incorrect. It actually occurred at the trigger. Which seemed backwards to me, but then again, I'm still learning how all this works.  I was able to attach the trigger to the device using " triggerName attachTo [this, [0,0,0]];".  And now I can move the object where ever needed on the map.  Thanks for the reply's barbolani and R3VO.

 

88Mike

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  

×