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 → Auto-actor cog.
Auto-actor cog.
2003-09-26, 6:05 PM #1
I have this cog for Mots:
Code:
# MotS Cog Script
# (note, this will not work right in Jedi Knight)
# AUTO-ACTOR.COG
#
# Sets an actor's weapon without making a new model and without messing 
# with new template settings for weapons and all that complicated stuff.
# 
# Just create a template with the parent as humanactor and set the 3do to
# that of the MP model you want to have the weapon. Put it in your level
# like you would any other 3do, then add this cog to your level.
# 
# actor - the thing you just put in your level
# gun - the model of the weapon (external) that you want the actor to have
# ai - the artifical intelligence you want the actor to have
# weapon/altweapon - the promary and secondary weapon templates for the actor
# 
# Lightsabers are not supported yet!
# 
# [ST]
# 
# This Cog is Not supported by LucasArts Entertainment Co

symbols
message      startup                                                          
message      created                                                           

thing        actor                                                            

model        gun                                                              

ai           smartness                                                               

template     weapon                                                           
template     altweapon                                                        


end                                                                           

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

code

startup:

call autoactor;

return;

# ........................................................................................

created:

call autoactor;

return;

# ........................................................................................

autoactor:

	// Let the dust settle a bit
	sleep(.05);

	// Give the actor the specified weapon
	jksetweaponmesh(actor, gun);

	// set the actor up with the AI
	aisetclass(actor, smartness);

	// set up the actor's gun-fire position
	setthingfireoffset(actor, '0.0207 0.0888 0.00');

	// set up the actors weapons
	setactorweapon(actor, 1, weapon);
	setactorweapon(actor, 2, altweapon);

return;

end

It sets the weapon model, but nothing else after that happens, it doesn't set the AI. I added print("AI SET"); under the aisetclass() and it did print. Was aisetclass() a verb taken out of MotS?

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"
2003-09-28, 8:04 AM #2
Try commenting out the startup message. If that doesn't do anything, send a zip with what's needed to see the problem.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!