Game Development Community

Help Needed - Vehicle Alternative Fire

by Lee Wickham · in Torque 3D Professional · 09/22/2011 (4:05 am) · 5 replies

Hi every one, im hoping that some of you our there may have the solution to a few problems im having with a vehicle of mine.

I have the a vehicle in game rigged with the following weapon mount points and nodes

mount2
mount3
mount4
mount5
mount6

(mount 0-1 have been reserved for player seats)

The Primary weapons (Cannons) are mounted as follows

mount2 - Mounted as Node 0
mount3 - Mounted as Node 2
mount4 - Mounted as Node 3

Note: i was unable to mount on node 1 as this kept on defaulting to alternative fire.

The Secondary weapons (Missiles) are mounted as follows

mount5 - Mounted as Node 4
mount6 - Mounted as Node 5

First problem: i have run in to is when the secondary weapons are mounted as follows they do no appear on the vehicle

Note: i have tripple checked that all mount points are correctly assigned in the missile image's
To test they were working and able to be mounted i tempoeraly mounted each missile image to node 1 and they appered mounted on the mountPoint they had been assigned.

Second Problem: upon getting the a Missiles mounted (node 1) i was unable to use the alternative fire (right hand mouse button) to fire thease weapons

Note: i have made sure that on each missile image that i have set up the fire state on the alternative trigger.

Additionally i added an echo to tell me what trigger was being activated when testing if the "right hand mouse button was deprressed" this showed triggger 1, however no matter how i set up the on trigger even for trigger 1 the missiles simply will not fire.

What i need help with:

Basically if some one could explane why it seemse when i attempt to mount the seconday weapons (missiles) as nodes 4 & 5 they do not appear on the model on mountpoint's 5 & 6 and why they only seem to appear if mounted (seporatly) as node 1

and secondly why when there mounted as node one does the on trigger event not seem to fire properly.


any insight in to thease problems would be extreamly helpfull or even if some one alredy has secondary fire working on a vehicle and could share the code so i can see what im doing wrong that would be a great help

as currently im at a loss to whats wrong.

thanx

- Lee





#1
09/22/2011 (10:03 pm)
There is a limit of 4 nodes for weapons on shapeBase (or their child) objects.

So only nodes 0, 1, 2, 3 will work (as you have seen)

in shapeBase.cpp around line 589 there is:
MaxMountedImages = 4,            ///< Should be a power of 2

Changing it to an 8 should allow your weapon to use nodes 0-7 but I don't know if this will introduce any side effects.
#2
09/22/2011 (10:13 pm)
@AF - ahh thank you, i'll definatly have a look in to this, and if there are any side effects i'll note them down and report back

Just an update incase any one else is looking for this to its acctually in "shapeBase.h" on line 589
#3
09/23/2011 (1:59 am)
Update:
Ok after modfying

MaxMountedImages = 4,            ///< Should be a power of 2

to

MaxMountedImages = 8,            ///< Should be a power of 2

and then recompiling the build

all of the vehicle in game seem to dissappear
upon clearing them from my testing level and attempting to re-add them i can see the bounding box but nothing else, as if its not longer loading the shape file.

upon reverting back to 4 maxMountedImages every thing goes back to normal

and ideas ?
#4
09/23/2011 (12:12 pm)
Oooh - looks like it's in the ghost. Have to track how that's sent over the net. Probably bit-shifting over something important.
#5
10/30/2011 (10:04 pm)
This issue is now resolved, there was another midifyer that needed to up updated to 4 that was causing this issue, some thing like MaxImages = e.t.c in another of the source files.