Angry_Cheddar
01-08-2001, 06:47 PM
As some people know, I'm working on a somewhat contraversial MOD (don't see why...), it's a Build Mod. Basically it's a bunch of custom levels with custom cogs and custom 3do's to build. This won't create hackers because it'll be run as a patch.
Now my problem is that I made a custom 3do, made a template for it in my level, and added it to my level. I put in the template name in the weap_raildet.cog so it would build. It builds, but the template changes to a ghost item... I used the _walkstruct parent in the level, and the weap_raildet.cog will build OTHER 3do's fine, like landpads or catwalks... any help?
Quilty
01-09-2001, 03:47 PM
What is a "build" mod?
------------------
"Dead Reckoning and now Dead Reckoning 2" (http://www.geocities.com/quilty00)
Hell Raiser
01-09-2001, 07:30 PM
I'm guessing a "Build Mod" would be a blank level, where you could "build" your own structures using the weapons to shoot out doors and pillars. (Seen frequently in hacked games, like in Bespin, hackers that shoot out doors)
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots
Angry_Cheddar
01-10-2001, 08:58 PM
that's right... so any help?
------------------
Hell Raiser
01-10-2001, 09:28 PM
JK has a limit to how may things you can have in a level, like 500 give or take, so keep that in mind. =)
Oooh, and a suggestion. Since it's a mod, have a special weapon that builds the structures, and have a hotkey that changes the structure that gets fired from the build gun. http://forums.massassi.net/html/biggrin.gif
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
[This message has been edited by Hell Raiser (edited January 10, 2001).]
Angry_Cheddar
01-10-2001, 10:32 PM
yeah that was the idea, but I'm still having problems with this cog... AAAAGGGHHH!!! *smashes face against keyboard repeatedly*
Angry_Cheddar
01-13-2001, 04:50 PM
why can nobody help me with this!? *continues to smash his face against the keyboard*
Hell Raiser
01-13-2001, 05:24 PM
Well, post the cog, I'll see if I can help.
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
Angry_Cheddar
01-13-2001, 10:43 PM
this is the cog, where TEMPLATE is the 3do template name for the static .jkl file. the problem is that even if the parent for the template is _walkstruct, the cog (this is the weap_raildet.cog) will change the 3do template's parent template to _ghostdecor.
# Jedi Knight Cog Script
#
# WEAP_RAILDET.COG
#
# WEAPON 7 Script
#
#
#
symbols
model povModel=rldv.3do local
model weaponMesh=rldg.3do local
sound mountSound=RailChargeArm01.WAV local
sound dismountSound=PutWeaponAway01.wav local
sound fireSound=RailChargeFire01.WAV local
sound outSound=RailChargeEmpty01.WAV local
thing player local
keyframe mountAnim=RldVmnt.key local
keyframe dismountAnim=RldVdis.key local
keyframe povfireAnim=RldVpst1.key local
keyframe holsterAnim=kyhlstr.key local
template projectile=TEMPLATE local
template projectile2=TEMPLATE local
thing rail local
flex fireWait=0.1 local
flex powerBoost local
flex autoAimFOV=25 local
flex autoAimMaxDist=5 local
flex holsterWait local
keyframe railAnim=rld0anim.key local
int trackID=-1 local
int mode local
int holsterTrack local
int selectMode=1 local
message activated
message deactivated
message selected
message deselected
#message newplayer
message autoselect
message fire
message timer
end
# ================================================== ======================================
code
fire:
player = GetSourceRef();
mode = GetSenderRef();
// Check that the player is still alive.
if(GetThingHealth(player) <= 0)
{
Return;
}
// Check Ammo - If we are out, autoselect best weapon.
if(GetInv(player, 15) < 1.0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
if(GetAutoSwitch() & 1)
SelectWeapon(player, AutoSelectWeapon(player, 1));
Return;
}
jkPlayPOVKey(player, povfireAnim, 1, 0x38);
SetPOVShake('0.0 -.01 0.0', '4.0 0.0 0.0', .05, 80.0);
rail = FireProjectile(player, projectile[mode], fireSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x30, autoAimFOV, autoAimFOV*2);
if((mode == 1) && (rail != -1))
{
PlayKey(rail, railAnim, 1, 20);
}
// Provide a kick backwards
ApplyForce(player, VectorScale(GetThingLVec(player), -40));
ChangeInv(player, 15, -1.0);
powerBoost = SetThingType(rail, 6);
ChangeFireRate(player, fireWait/powerBoost);
Return;
# .................................................. ......................................
activated:
player = GetSourceRef();
mode = GetSenderRef();
jkSetWaggle(player, '0.0 0.0 0.0', 0);
powerBoost = GetInv(player, 63);
ActivateWeapon( player, fireWait/powerBoost, mode );
Return;
# .................................................. ......................................
deactivated:
player = GetSourceRef();
mode = GetSenderRef();
jkSetWaggle(player, '10.0 7.0 0.0', 350);
DeactivateWeapon( player, mode );
Return;
# .................................................. ......................................
selected:
player = GetSourceRef();
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, 7);
// Check Ammo - If we are out, autoselect best weapon.
if(GetInv( player, 15 ) < 1.0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
if(GetAutoSwitch() & 1)
SelectWeapon(player, AutoSelectWeapon(player, 1));
}
Return;
# .................................................. ......................................
deselected:
player = GetSourceRef();
PlaySoundThing(dismountSound, player, 1.0, -1, -1, 0x80);
jkPlayPOVKey( player, dismountAnim, 0, 18 );
holsterWait = GetKeyLen(holsterAnim);
SetMountWait(player, holsterWait);
holsterTrack = PlayKey(player, holsterAnim, 1, 0x4);
SetTimerEx(holsterWait, 2, 0.0, 0.0);
if (trackID != -1)
{
jkStopPOVKey( player, trackID, 0 );
trackID = -1;
}
jkSetWaggle(player, '0.0 0.0 0.0', 0);
Return;
# .................................................. ......................................
//newplayer:
// player = GetSourceRef();
//
// // Make sure that if the player is respawning, the old mount isn't playing anymore.
// if (trackID != -1)
// jkStopPOVKey(player, trackID, 0);
//
// Return;
# .................................................. ......................................
autoselect:
selectMode = GetSenderRef();
player = GetSourceRef();
// If the player has the weapon
if(GetInv(player, 7) != 0.0)
{
// If the player has ammo
if(GetInv(player, 15) != 0.0)
{
// query for ammo
if(selectMode == -1)
{
ReturnEx(900.0);
Return;
}
if((selectMode == 0) && !(GetAutoPickup() & 2))
{
ReturnEx(900.0);
Return;
}
if((selectMode == 1) && !(GetAutoSwitch() & 2))
{
ReturnEx(900.0);
Return;
}
if((selectMode == 2) && !(GetAutoPickup() & 2))
{
ReturnEx(900.0);
Return;
}
ReturnEx(-2.0);
Return;
}
else
{
ReturnEx(-1.0);
Return;
}
}
else
{
ReturnEx(-1.0);
}
Return;
# .................................................. ......................................
timer:
StopKey(player, holsterTrack, 0.0);
Return;
end
[This message has been edited by Angry_Cheddar (edited January 13, 2001).]
Hell Raiser
01-13-2001, 11:48 PM
Nohting wrong with the cog but elaborate on:
"the problem is that even if the parent for the template is _walkstruct, the cog will change the 3do template's parent template to _ghostdecor."
How are you finding out this information?
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
Angry_Cheddar
01-14-2001, 10:41 AM
I make a 3do, make a template in the static .jkl with parent _walkstruct. I go into the game and it's a _ghostdecor 3do (meaning that you can walk and shoot through it as if it's not there).
Hell Raiser
01-14-2001, 01:29 PM
Can you post the template and parent template(s)?
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
Angry_Cheddar
01-14-2001, 04:13 PM
I suppose...
_walkstruct parent template
# DESC:
# BBOX: 0 0 0 0 0 0
_walkstruct _structure thingflags=0x400048
_ghostdecor parent template
# DESC:
# BBOX: 0 0 0 0 0 0
_ghostdecor _decor collide=0
3do template (used in TEMPLATE for the cog). In this case it's platfrm1
# DESC:
# BBOX: -1.15 -1.2 -.09 1.18 1.25 .09
platfrm1 _walkstruct size=1.256947 movesize=1.256947 model3d=platform.3DO
[This message has been edited by Angry_Cheddar (edited January 14, 2001).]
Hell Raiser
01-14-2001, 05:38 PM
Hrmm, well, I'd hate to say it, but I'm stumped. =\
Last thing I can suggest is putting this at where fireprojectile() is in your cog:
dummy = fireprojectile(blah blah blah)
SetThingFlags(dummy,0x400048);
Hope this works for ya.
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.