Jump to content
Sign in to follow this  
Casto

Can i attach a gamelogic to vehicle

Recommended Posts

..., is it possible, and how??

i need this for a vehiclecam to target or else the camera will bounch to every site.

Share this post


Link to post
Share on other sites

try naming the vehicle "asdf" (or something).

Then name the game logic "a" or whatever U want.

Make a trigger that will activate whenever U want the Game Logic to start following the Vehicle. In the triggers On Activation field type a1=true (or something).

Then create a new trigger with a1 as condition, mark repeatedly, in the On Activation field type:

"a" setpos [(getpos "asdf" select 0),(getpos "asdf select 1),(getpos "asdf" select 2)]; a1=false

Then in the On Deactivation field type A1=true.

This will make it loop so the Game Logiv will be where Ur vehicles is all the time, its not perfect but I hope its good enough.

I think this should work cuz I made an inflamed fireplace follow a AI 10 meters over his head just for fun this way and it worked (except istead of (getpos "asdf select 2) i type 10.

Hope it works and make sure U try it be4 U thank me. tounge.gif

Share this post


Link to post
Share on other sites

But i need the gamelogic to always folow like a vehiclecam (loop)

so i can use the vehiclecam and target to a game logic, I need this to keep the camera still, and not loke anotherway when the vehicle take's a turn on the road.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Jan. 18 2002,18:08)</td></tr><tr><td id="QUOTE">try naming the vehicle "asdf" (or something).

Then name the game logic "a" or whatever U want.

Make a trigger that will activate whenever U want the Game Logic to start following the Vehicle. In the triggers On Activation field type a1=true (or something).

Then create a new trigger with a1 as condition, mark repeatedly, in the On Activation field type:

"a" setpos [(getpos "asdf" select 0),(getpos "asdf select 1),(getpos "asdf" select 2)]; a1=false

Then in the On Deactivation field type A1=true.

This will make it loop so the Game Logiv will be where Ur vehicles is all the time, its not perfect but I hope its good enough.

I think this should work cuz I made an inflamed fireplace follow a AI 10 meters over his head just for fun this way and it worked (except istead of (getpos "asdf select 2) i type 10.

Hope it works and make sure U try it be4 U thank me. tounge.gif<span id='postcolor'>

it say : type string, exspect object.

something is wrong

Share this post


Link to post
Share on other sites

mad.gif common mad.gif

i know there are guys who can solf this problem.

Share this post


Link to post
Share on other sites

are you wanting the camera to look at a game logic while moving along with a target? thus being the vehicle in movement?

Share this post


Link to post
Share on other sites

yes plzzz

example:

your cam i looking from the drivers seat straight a head and doesnt move.

normaly it will look staight a head but if you turn around the camera will look backwards.

i hope this will help.

Share this post


Link to post
Share on other sites

Ok ok ok,

Here goes :

Create a script, call it "gamelogic.sqs"; (or something)

I named the gamelogic "gamelogic1"

and the target "targetunit1"

#start

gamelogic1 setpos (getpos targetunit1)

~0.2

goto "start"

save that script in your mission directory and than, on the init field/activation field (whereever you want it)

type :

this exec "gamelogic.sqs":

That should make the gamelogic follow the unit like a sticky bomb.

Bloodmixer

Share this post


Link to post
Share on other sites

but the problem is by doing that is, the game logic is going to be ontop of the unit so there going to have to be a way of setting the game logic infront on the vehicle or unit by about 4 m and constantly moving... this way you would be aloud to make the camera target the unit in the car and then instantly target the game logic....

e.g.

cam = "camera" [0,0,0]

cam cameraeffect ["internal", "back"]

cam camsettarget aP

cam camsetrelpos [0,0,1.7] //should be in units face

cam camcommit 0

@camcommitted _cam

~0

#loop

loop=1

cam camsettarget gamelogic1

cam camcommit 0

@camcomitted _cam

~0.5

?(loop==1):goto "loop"

exit

Im not saying this is deffinatly going to work but you can try...

First your going to have to change the position of the gamelogic.... i hope this helps... if you get the script to work and still cant get the stupid thing working then send it to me

wink.gif

Share this post


Link to post
Share on other sites

so there is no need for my vehiclecam.sqs ?

Share this post


Link to post
Share on other sites

When i keep thinking about it, it gets more and more confusing.....

hhhhhmmmmmmmm?confused.gif?? confused.gif

send me the mission and i shall have a crack with it.. include a readme file so that i know what you want to happen....

i will do my best...

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">When i keep thinking about it, it gets more and more confusing.....

hhhhhmmmmmmmm?confused.gif?? confused.gif

send me the mission and i shall have a crack with it.. include a readme file so that i know what you want to happen....

i will do my best...<span id='postcolor'>

actualy i haven't started the mission yet.

i want to know how to do the thinks i want and then i start making mission.

but then i will start right away.

and send you a pm when it's done.

Share this post


Link to post
Share on other sites

nooooooooooooooo

i cant use a vehicle cam on a m113.

darn. sad.gif

never mind Rob ,sorry.

Share this post


Link to post
Share on other sites

of course you bloody can.. you can use the vehicle cam on any unit in the game as long as you specify the name of a unit..... I dont know why you say that...

Share this post


Link to post
Share on other sites

you have to make a seperate script for the unit you want to use..... and i thought you wanted a jeep not an m113.. how are you going to be able to make a man pretend to look around inside armour?

the other script should be like so

[nameofunit, gamelogic] exec "vehiclecam.sqs"

something like that.. i shal get to you when i get off school...

Share this post


Link to post
Share on other sites

thankx rob.

and the m113 doesnt work because from the inside you can look trough the steel wals.

BTW where did you learn to script confused.gif ??

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  

×