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 → maybe this has been done... or maybe not...
maybe this has been done... or maybe not...
2003-11-12, 4:25 PM #1
driveable vehicles..
[http://67.87.115.203:81/brad_s/temp/jeep-cog.jpg]
activate vehichle with spacebar, switch from walkplayer to jeep.
Controls: Same as walkplayer - drive=forward, reverse=back, turn=arrows
Exit by spacebar again..

Has this been done? can someone help me out here?

------------------
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
2003-11-12, 4:27 PM #2
That's funny.

Let me clarify. This isn't as simple as it seems. Pressing the left button in game now makes you turn on a center axis. Perhaps you could offset the center, but even then, no vehicle can turn 180 without moving in any direction. So you'd first have to disable this. Then you'd need to incorporate acceleration, or there'd be pretty much no use for the jeep. Then it'd need physics different from the player in many ways. Lastly, good luck on giving damage when hit by this thing.
------------------
"I was driving along listening to the radio, when Judas Priest comes on. It was 'You've got another thing coming.' All of a sudden, I enter 'VICE CITY RAMAGE MODE' and nearly ran some guy over"
- ]-[ellequin

[This message has been edited by jEDIkIRBY (edited November 12, 2003).]
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2003-11-12, 5:59 PM #3
I was looking into that at one time. Seems there was a POC map with drivable vehicles. It worked a lot like the jeeps in BF1942. The only difference was that it didn't change the walkplayer model. It attatched the walkplayer to the object...so the walkplayer was sliding around a bit while you were trying to drive the hoovercraft.

------------------
Try not, do; or do not.
Math is infinitely finite, while the universe is finitely infinite. PI = QED
2003-11-12, 7:44 PM #4
Jedikirby, YOU. CAN. NOT. COG.

Never give out advice on cogging, kthxbye.

As far as driveable vehicles go, apparently Cave Demon made a hoverbike level or something - the level screams 'driveable vehicle' like crazy, I don't see why it couldn't be done.

Hell, all you'd need to do is run a pulse that checked player speed and then decided whether he could turn or not.

There's flags for this somewhere in datamaster - no turning, limited turning, and normal turning.

Check it out.

------------------
Duel Zero key count: Zero! Down to guns and forces. Expect a release soon.
2003-11-13, 5:25 AM #5
actualy the best way would be to set the players pos at the center of the jeep (as long as the center of the jeeps been corcted in JOKE..

then all you have to do is give the jeep a 0x8 attachment (through attachthingex()) to the palyer, and finaly set the players actor flags 0x10 to make him invisable.

i have done it and had acseptable results, unfortunatly i resently had a virus that destroyed all my files, and i dont ahve the code.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-11-13, 5:28 AM #6
oh, and you would have to use parsearg to extend the players collid sphear to encompas the vehicle and change the maxvel and maxrotvel.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior

[This message has been edited by [SF]pjb (edited November 13, 2003).]
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-11-13, 7:27 AM #7
But at the same time, you couldn't give the jeep any real vehicle physics.

As for Cave-Demon's code, which I showed you, and edited, myself, it's extremely unlike a vehicle in every way. It couldn't turn normally, and it didn't have any falling physics.

JediKirby

------------------
"I was driving along listening to the radio, when Judas Priest comes on. It was 'You've got another thing coming.' All of a sudden, I enter 'VICE CITY RAMAGE MODE' and nearly ran some guy over"
- ]-[ellequin
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2003-11-13, 8:28 AM #8
if Mots:

Code:
# Jedi Knight Cog Script
# [EH_AceTFL]
symbols
thing       player                           local
thing       atst			
thing       outpost
thing       cam				local
           
int         done=0                           local
int         active=0                         local
int         old_camera                       local
int         camera=-1                        local
flex        cost=0                        local
flex        useCost=0                      local
int         rank=0                           local
flex        mana                             local
flex        tempFlex                         local
vector      tempvec                          local
vector      tempvec2                         local
vector      motionVector                     local
flex        startHealth=0                    local
vector      startPosition                    local
sound       atstSound

template    fire_tpl=+lasercannon
template    altfire_tp=+raildet

sound 	    fire=wlkrsht2.wav
sound       altfire=assassinfire1.wav
int         channel=-1                       local
int         inbubble=0                       local
int         bouncing=0                       local
int         multiCap=0                       local
int         oldFlags                         local
int        charging=1				local
int	    altfirech=4 			local
flex        pulsetime=1

message     startup
message     shutdown
message     activated
message     timer
message     pulse
message     playeraction
message     killed
message     user0

end
# ========================================================================================
code
startup:
   player = GetLocalPlayerThing();
   AISetAlignment(atst, 0);
   inbubble = 0;
   call stop_power;
   Return;
# ........................................................................................
shutdown:
   call stop_power;
   Return;
# ........................................................................................
activated:
   if(inbubble) Return;
   if(GetInv(player, 41))
   {
      if(IsInvActivated(player, 41))
      {
         SendMessage(GetInvCog(player, 41), activated);
      }
   }
   if((GetCurWeapon(player) == 13) || (GetCurWeapon(player) == 10))
      SelectWeapon(player, 1);      // Select fists.
   if(GetSectorFlags(GetThingSector(player)) & 2) Return;
   if(IsInvActivated(player, 35)) Return;
      PlaySoundThing(atstSound, player, 1.0, -1, -1, 0x80);
      motionVector = '0 0 0';
old_camera = GetCurrentCamera();
SetCurrentCamera(0);
Print("At-St cocpit");
Print("Please go to first person view.");
Print("");
Print("");
Setcamerafocus(0,atst);
TeleportThing(player,outpost); 
AISetAlignment(atst, 1);
      StopThing(player);
      SetActionCog(GetSelfCog(), 0x7FFFFFFF);
      SetActorFlags(player, 0x80800000);
      active = 1;
      startHealth = GetThingHealth(player);
      startPosition = GetThingPos(player);
      SetPulse(pulsetime);
      SetBinWait(player, 35, 1.0);
   Return;
# ........................................................................................
playeraction:
   if(GetSectorFlags(GetThingSector(player)) & 2)
   {
      call stop_power;
      ReturnEx(0.0);
      Return;
   }
   if(!active)
   {
      ReturnEx(0.0);
      Return;
   }
if (GetParam(0) == 1.0)             // Crouch
   {
      tempFlex = 0.0;
      if (GetParam(2) != 0.0)
         tempFlex = 2.8;
      motionVector = VectorSet(VectorX(motionVector), -tempFlex, VectorZ(motionVector));
      ReturnEx(0.0);
   }
   else
   if (GetParam(0) == 2.0)             // Activated
   {
      call stop_power;
      ReturnEx(0.0);
   }
   else
   if (GetParam(0) == 3.0)             // Fire
   {
#if (GetParam(2) == 1.0) Call altfire;
#else
#call firenow;	
   }
   else
   if (GetParam(0) == 5.0)             // Turn
   {
      tempvec = GetThingRotVel(atst);
      tempvec = VectorSet(VectorX(tempvec), GetParam(2), VectorZ(tempvec));
      SetThingRotVel(atst, tempvec);
      ReturnEx(0.0);
   }
   else
   if (GetParam(0) == 6.0)             // Fwd / Bkwd Motion
   {
      motionVector = VectorSet(VectorX(motionVector), VectorY(motionVector), GetParam(2));
      ReturnEx(0.0);
   }
   else
   if (GetParam(0) == 10.0)         // Select Inventory Item
   {
      ReturnEx(0.0);
   }
   else
   if (GetParam(0) == 11.0)         // Select Skill
   {
      ReturnEx(0.0);
   }
   else
   if (GetParam(0) == 12.0)         // Use Inventory Item
   {
   }
   else
   if (GetParam(0) == 13.0)         // Use Skill
   {
      if (GetParam(1) == 2.0)
         if (GetParam(2) == 35.0)
            if (bouncing == 0)
              call stop_power;
      ReturnEx(0.0);
   }
   else
   if (GetParam(0) == 14.0)         // Other Actions
   {
      if (GetParam(2) == 0.0)    // Cycle Camera
      {
         if (GetCurrentCamera() == 0)
         {
         }
      }
      ReturnEx(1.0);
   }
   else
   {
      ReturnEx(0.0);
   }
   // Add up the various velocities.
   tempvec  = GetThingLVec(atst);
   tempvec  = VectorScale(tempvec, VectorZ(motionVector) / 5.0);
   tempvec2 = GetThingUVec(atst);
   tempvec2 = VectorScale(tempvec2, VectorY(motionVector) / 5.0);
   tempvec  = VectorAdd(tempvec, tempvec2);
   tempvec2 = GetThingRVec(atst);
   tempvec2 = VectorScale(tempvec2, VectorX(motionVector) / 5.0);
   tempvec  = VectorAdd(tempvec, tempvec2);
   SetThingVel(atst, tempvec);

   Return;
# ........................................................................................
timer:
   if (GetSenderId() == 1)
   {
      // Turn off control capture.
      SetActionCog(-1, 0);
      SetInvActivated(player, 35, 0);
   }
   Return;
# ........................................................................................
pulse:
if(charging != 1)
{
charging = charging + 1;
}
if(altfirech != 4)
{
altfirech = altfirech + 1;
}
Return;
# ........................................................................................
killed:
      call stop_power;
Return;
# ........................................................................................
stop_power:
   if(active)
   {
      ClearActorFlags(player, 0x80800000);
      SetCameraFocus(0, player);
      SetCurrentCamera(old_camera);
	Print("");
	Print("");
	Print("");
	Print("");
	AISetAlignment(atst, 0);
	TeleportThing(player,atst); 
   }
   SetPulse(0);
   if(channel != -1)
   {
      StopSound(channel, 0.1);
      channel = -1;
   }
   KillTimerEx(2);
   active = 0;
   bouncing = 0;
   multiCap = 0;
   SetTimerEx(0.5, 1, 0, 0);
   Return;

# ........................................................................................
firenow:

if(charging == 1)
{
FireProjectile(atst,fire_tpl,fire,-1, '.03/.2/0', '0 0 0', 0, 0, 0, 0); 
FireProjectile(atst,fire_tpl,fire,-1, '-0.03/.2/0', '0 0 0', 0, 0, 0, 0); 
charging = 0;
}
Return;

altfire:
if(altfirech == 4)
{
FireProjectile(atst,altfire_tp,altfire,-1, '.2/0/0', '0 0 0', 0, 0, 0, 0); 
altfirech = 0 ;
}
Return;
end


if JK:
GBK maked this alredy. I lost his code.

------------------
The miners of Kiith Somtaaw sacificed much, and risked all. For their efforts they were brought into the inner most circle of Hiigaren power. Naabal, S'jet, and Sobanii bowed before them. And from that day to this, Somtaaw's children have been known to one and all as Beastslayers..
2003-11-13, 11:45 PM #9
Quote:
<font face="Verdana, Arial" size="2">
Jedikirby, YOU. CAN. NOT. COG.

Never give out advice on cogging, kthxbye.
</font>


Ouch !! I guess the truth hurts sometimes... lol. I've got to say - one of Checksum's more "candid" postings [http://forums.massassi.net/html/wink.gif]

Plus it made me laugh. I have absolutely nothing against you JediKirby, but Checksum's comment just simply made my day - maybe the way it was stated so "matter-of-factly"? lol [http://forums.massassi.net/html/rolleyes.gif] [http://forums.massassi.net/html/tongue.gif]

But post related, JK has got some useful mechanics (such as acceleration and inertia), but just doesn't really have a practical way of providing vehicle support, IMHO [http://forums.massassi.net/html/redface.gif]

MotS key trapping concept does work much better (you have access to directional facilites amongst other things), as EH_AceCSF touches upon, but it still doesn't get you [i/]all[/i] the way there - the game engine itself is just left wanting, at the end of the day... [http://forums.massassi.net/html/frown.gif]

Hope this has (somewhat) helped... [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... [http://forums.massassi.net/html/wink.gif]

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

[This message has been edited by lucky_jackpot (edited November 14, 2003).]
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-14, 12:19 AM #10
There's no real way to do this. The wheels are where the problem lies. Hellcat told me once JK needs basic trig to calculate wheelspinning/turning. But, I will say that a hovercraft-type vehicle would be doable.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2003-11-14, 5:32 AM #11
could you have it play .keys when it moves and stuff, like the wheels spinning and when you turn, have the front wheels turn? would it work in mots only, both, or neither?

------------------
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
2003-11-16, 1:49 PM #12
Heh, I love the simplicity of the descriptions of drivable vehicles. Dont take this personally guys, but theres alot more to making a jeep cruise than just attaching the vehicle to the player.

Not so long ago I started out on a 'realistic vehicle cog'. Having done a fair amount of physics and vehicle analysis I thought that I would have a head start on everyone else. Unfortunatly I ran into a major problem - its called physics in JK. The lack of mathematical support for things such as basic trig meant that accuratly calculating turning etc was impossible.

The current drivable vehicles dont allow for any forms of realistic handling. Its just your standard player physics except the player can run realy fast.

Now thats just for turning...

You really need to consider things such as the vehicle rolling over, shock absorbers, weight distribution etc

Using fudge factors and alot of time I am sure you could come up with something 1/2 cool. But never anything near to the standards of bf1942 etc.

But you never know, during my holidays I *may* try again.

------------------
Team Battle.
Team Battle.
2003-11-17, 11:23 AM #13
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Hellcat:

You really need to consider things such as the vehicle rolling over, shock absorbers, weight distribution etc
</font>


Those were my points, but hey, what do I know? I can't cog [http://forums.massassi.net/html/rolleyes.gif].

JediKirby

(PS. I don't use smilies often, so consider it a bad thing.)

------------------
"I was driving along listening to the radio, when Judas Priest comes on. It was 'You've got another thing coming.' All of a sudden, I enter 'VICE CITY RAMAGE MODE' and nearly ran some guy over"
- ]-[ellequin
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2003-11-17, 11:56 AM #14
but my lowering the maxrotvel you can slowdown the turing of the vehicle.

and also could i point out that that you can find the velosity of the player?

now would it therefor not be simple to link the MAXROTVEL of the player to his velosity? their by slowing the rotation dow the slower the player travels util at a stadstill he just cant actualy rotate?

somthing like this..

if(velosity>=6) parsearg("maxrotvel=3);
if(velosity>=4) parsearg("maxrotvel=2);
if(velosity>=2) parsearg("maxrotvel=1);
if(velosity==0) parsearg("maxrotvel=0);
if(velosity<=2) parsearg("maxrotvel=1);
if(velosity<=4) parsearg("maxrotvel=2);
if(velosity<=6) parsearg("maxrotvel=3);

ad so on...

also (correct me if i am incorrect as i dont have DM here) if you can find the rotaial vector of the player couldent you i turn increase the actual roll of the player the further you turn? then if its above a certain about play a car rolling over key and kill said player (after addig the good old cutseen play frease flag)

as far as i see so far there is no need for trig... but i have been known to be wong..

and if i am right, then i think you shouldet dey it and insted get o your hands and needs ad provide me with large abouts of iced cakes while grovelig in apology
;-) j/k

P.S. Other from the spelling do you thig the way i talk is childish BBC worldservice class english or just plain normal as certain umetion people have maid insulting comments of a nature that is to the afometioed effect.
------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior

[This message has been edited by [SF]pjb (edited November 17, 2003).]
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-11-17, 12:48 PM #15
Quote:
<font face="Verdana, Arial" size="2">
and also could i point out that that you can find the velosity of the player?
</font>


I dont think I said you couldnt did I? [http://forums.massassi.net/html/confused.gif]

Last time I checked maxrotvel doesnt effect mouse movement... nor does is stop straffing.

You also need to consider turning circle relative to wheelbase etc. Also if you want a tiny bit of realism you need to add skidding when you turn... so if you turn to hard the back of the car drifts. All trig stuff.

Trust me, your not getting anything but a poor set of fudge factors that pretty much sets up a kyle that runs really fast.

------------------
Team Battle.
Team Battle.
2003-11-17, 1:27 PM #16
Trigonometric functions can be reproduced in JK, or anything that can do basic arithmetic. Albeit a bit cumbersome in COG.

http://www.efunda.com/math/taylor_series/trig.cfm

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.

↑ Up to the top!