Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Cog causes game to crash when I move...
Cog causes game to crash when I move...
2001-02-16, 2:53 AM #1
no, it's the troop transport from the game...

------------------
Those who stare in the eyes of death and laugh will be the first to go.
Those who stare in the eyes of death and laugh will be the first to go.
2001-02-19, 2:59 AM #2
This is supposed to create a trooptrans on the player, but it doesn't work. Whenever I select the weapon, if I turn left or right the game crashes. I'm not too good at cogging yet, so if you can find the error please point it out.

NOTE: I first thought the problem was that you couldn't have two templates right on top of eachother (the player and the trooptrans) so I tried to add to the player vector. If that was stupid, or just doesn't work, I won't be using it anyway.

oh, these are just the sections I changed from the strifle.cog The only other change I made was a DestoryThing(thingcreate); in deselected

Code:
symbols

model       povModel=strv.3do                   local
model       weaponMesh=strg.3do                 local

keyframe    mountAnim=StrVmnt.key               local
keyframe    dismountAnim=StrVdis.key            local
keyframe    povfireAnim=StrVpst1.key            local
keyframe    holsterAnim=kyhlstr.key             local

sound       mountSound=df_rif_ready.wav         local
sound       dismountSound=PutWeaponAway01.wav   local
sound       fireSound=trprsht2.wav              local
sound       outSound=trprout.wav                local

template    projectile=+stlaser                 local
template    taxi=trooptran			local

thing       player                              local

vector      randVec                             local

flex        fireWait=0.2                        local
flex        holsterWait                         local
flex        powerBoost                          local
flex        autoAimFOV=25                       local
flex        autoAimMaxDist=5                    local

int         dummy                               local
int         trackID=-1                          local
int         fireChannel=-1                      local
int         holsterTrack                        local
int         mode                                local

message     activated
message     deactivated
message     selected
message     deselected
message     autoselect
message     fire
message     timer

end

...

selected:
   player = GetSourceRef();
   usesector = GetThingSector(player);
   usevector = GetThingPos(player);
   thingcreate = CreatThingAtPos(taxi, usesector, usevector + '0.0 0.0 0.5', '0.0 0.0 0.0');
   AttachThingtoThingEx(thingcreate, player, 0x8);
   PlayMode(player, 41);
   PlaySoundThing(mountSound, player, 1.0, -1, -1, 0x80);
   jkSetPOVModel(player, povModel);
   SetArmedMode(player, 1);
   jkSetWeaponMesh(player, weaponMesh);
   jkSetWaggle(player, '10.0 7.0 0.0', 350);
   trackID = jkPlayPOVKey(player, mountAnim, 0, 20);
   SetMountWait(player, GetKeyLen(mountAnim));
   jkClearFlags(player, 0x5);
   SetCurWeapon(player, 3);

   Return;


------------------
Those who stare in the eyes of death and laugh will be the first to go.
Those who stare in the eyes of death and laugh will be the first to go.
2001-02-19, 8:00 AM #3
A thing can be created on another thing, no real sense in using vectors.

------------------
Together we stand.
Divided we fall.
2001-02-19, 1:17 PM #4
So what could be causeing the problem? It wouldn't just be the vectors right?

------------------
Those who stare in the eyes of death and laugh will be the first to go.
Those who stare in the eyes of death and laugh will be the first to go.
2001-02-19, 3:53 PM #5
Hmmm this one looks like a tuffy.

Lets see .. I've only had it once or twice crash and one of them was my Controlable Missile ...

Anyway .... There maybe something wrong with the 3do template you have created ... is it a custom one Hoard ?

↑ Up to the top!