Help with "moveMap" and "vehicleDriverMap
by CIMO · in General Discussion · 06/03/2006 (5:28 am) · 8 replies
I have insert a vehicle in my game...With the "vehicle resource"
But i have this problem:
If enter in a vehicle an suicide or kill my character...When respawn my character have a vehicle keyMap ...
I try to use this code....
THANKS
But i have this problem:
If enter in a vehicle an suicide or kill my character...When respawn my character have a vehicle keyMap ...
I try to use this code....
i put this in: -> function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc)
// ---
if ( isObject( vehicleDriverMap ) || isObject( vehiclePassengerMap ) )
{
vehicleDriverMap.delete();
vehiclePassengerMap.delete();
}
new ActionMap(moveMap);But not function...Any idea?THANKS
#2
06/03/2006 (8:15 am)
My game or this work?
#3
06/03/2006 (12:32 pm)
Never say fix this?
#4
Sorry , I'm not that far yet in TGE, and my programming skill simply sucks.
perhaps you'd like to repost this in private/programming forum?
06/03/2006 (10:18 pm)
So you have different keys for player and vehicle? I see.. Cool! Sorry , I'm not that far yet in TGE, and my programming skill simply sucks.
perhaps you'd like to repost this in private/programming forum?
#5
06/04/2006 (9:15 am)
You don't want to delete the maps, simply push and pop them. Basically, in your "new ActionMap()", you are creating an empty map.
#6
06/04/2006 (9:21 am)
This code ?:i put this in: -> function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc) // --- if ( isObject( vehicleDriverMap ) || isObject( vehiclePassengerMap ) ) new ActionMap();
#7
Instead of deleting your action maps, simply pop them off the stack, and push the normal move map onto the stack:
vehicleDriverMap.pop();
vehiclePassengerMap.pop();
moveMap.push();
The above code may not be exact, but it's the technique you should use for action map swapping.
06/04/2006 (9:47 am)
Correct. As I said, that new ActionMap() is simply creating an empty action map with no bindings in it.Instead of deleting your action maps, simply pop them off the stack, and push the normal move map onto the stack:
vehicleDriverMap.pop();
vehiclePassengerMap.pop();
moveMap.push();
The above code may not be exact, but it's the technique you should use for action map swapping.
#8
i try this modify...and i suppose....
If i put the code when player respown?
06/05/2006 (2:08 pm)
Mmmi try this modify...and i suppose....
If i put the code when player respown?
Torque Owner Broken_Sword