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 → Player switch in MP
Player switch in MP
2003-05-11, 7:18 PM #1
I want to make drivable speeders for my current project. Anyway one of you talented coggers can code a cog that will switch a MP characters skin to that of the speeder they activate? Or is that even possible?

If so, how is it then possible to change the way the speeder moves (so it moves like a speeder and not a character)? Thanks in advance for any help you can provide me with.

------------------
Try not, do; or do not.
Math is infinitely finite, while the universe is finitely infinite. PI = QED
2003-05-12, 2:18 AM #2
well i am working on a cog to turn the paly er into a AT-ST, but its not changeing the SND or the PUP, but still. it will change the 3DO.
Code:
# Jedi Knight Cog Script
#
# makemeat.cog
#
# makes you into a AT-ST
# 
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols
thing        player                             local                         
message      activated                                                        
message      startup   
thing	switch                                                       
end                                                                           
# ========================================================================================
code
startup:
Player=GetLocalPlayerThing(); 
return;
activated:
SetThingModel(player, at.3do); //if you want a different 3DO change this line.
parsearg(Player, model=at.3do);
parsearg(Player, puppet=at.pup);
parsearg(Player, soundclass=at.snd);
return;
# ........................................................................................
end


------------------
I am pjb.
Another post......
another moment of my life wasted.....
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-05-12, 4:47 AM #3
That doesn't seem to work. I would need it to be template based and not thing number based anyhow. Thanx though.

------------------
Try not, do; or do not.

[This message has been edited by Friend14 (edited May 12, 2003).]
Math is infinitely finite, while the universe is finitely infinite. PI = QED
2003-05-12, 12:26 PM #4
pjb - he was wanting it to change when he activated the speeder [http://forums.massassi.net/html/tongue.gif]
Try this instead: (a little different)
Code:
symbols
Thing     speeder
Thing     player     local
model     atst=at.3do
Message   Startup
Message   Activated
end
code
Startup:
     Player = jkGetLocalPlayer();
     Return;

Activated:
     SetThingModel(Player, atst);
     ParseArg(Player, "puppet=atst.pup soundclass=atst.snd");
     Return;
end

You'll have to add the size and movesize values, as well as change the .snd and .pup files to your own, and change velocities, thrusts, etc. so it doesn't use the player's. (and also the weapon). If you post your template, I'll update the cog (whenever I'm online again.) Also tell me what speed you want, weapon, etc. everything.

------------------
May the forks be with you.
There is a great disturbance in my shorts...
Thank you for reading this post. You owe me $24.95 + S&H.
Catloaf, meet mouseloaf.
My music
2003-05-13, 2:47 AM #5
that one did work when you activated the speeder "thing".

i wonder why it wouldent work....
oh well.. your one is better any way..

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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-05-13, 3:38 AM #6
To do the puppet and sound switch, you need C/S with the verb ParseArg(thing, "param");

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-13, 10:55 AM #7
Oops. Sorry pjb. The "switch" symbol threw me off (for some reason).

------------------
May the forks be with you.
There is a great disturbance in my shorts...
Thank you for reading this post. You owe me $24.95 + S&H.
Catloaf, meet mouseloaf.
My music
2003-05-13, 11:38 AM #8
Quote:
<font face="Verdana, Arial" size="2">Oops. Sorry pjb. The "switch" symbol threw me off (for some reason).</font>


no worries, it happens to me with my own cogs. :-( thats why i sux at them.

Quote:
<font face="Verdana, Arial" size="2">
To do the puppet and sound switch, you need C/S with the verb ParseArg(thing, "param");
i noticed that, but i cant work out how to do it (having no idea how C/S cogs work) so can you explain further?
</font>


------------------
I am pjb.
Another post......
another moment of my life wasted.....
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-05-13, 12:15 PM #9
Use this cog.
Code:
# Jedi Knight Cog Script
#
# C/S for Puppet and sound switch
#
# [DP]
#
symbols
message         trigger
int             id
end
# ========================================================================================
code
Trigger:
   id = GetSenderRef(); // Maybe GetSourceRef(), forgot right now
   // Too lazy to look up
   If(id == 200)
      ParseArg(GetParam(0), "puppet=atst.pup soundclass=atst.snd");
   Return;
end

Plus in the sending cog, add this line instead of the ParseArg line.
SendTrigger(-1, 200, player, 0, 0, 0);
Thats simple C/S.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-13, 2:20 PM #10
A nudge in the right direction.

Code:
template	vehicle
                  

end                                                                           

# ========================================================================================

code

startup:

	for(i=0;i<GetThingCount();i=i+1){

		if(GetThingTemplate(i)==vehicle){
			CaptureThing(i);
		}

	}

return;


This'll get, and capture the messages of, any things with the specified template in the level.

------------------
His pot is blacker than his kettle!

Phoenix Swords

[This message has been edited by LordVirus (edited May 13, 2003).]
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2003-05-13, 4:54 PM #11
Or you can just add to the one class cog and use that class cog for all of your shells. I personally think, this comes from expirence, that adding another outside cog like that (just to capture things) is really pointless and confusing and can be troublesome. This is based on teh assumption that this is a custom level using some kind of dummy shell.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[edit]Reworded respone[/edit]

[This message has been edited by Descent_pilot (edited May 13, 2003).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-13, 5:16 PM #12
Gah, I'm already confussed. Simple C++ I get, cog, I'll never get. [http://forums.massassi.net/html/frown.gif]

------------------
Try not, do; or do not.
Math is infinitely finite, while the universe is finitely infinite. PI = QED
2003-05-14, 2:08 AM #13
LOL.

but as i am doing a similar thing i would like to know more about the C/S side of COG. and parsarg

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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?

↑ Up to the top!