View Full Version : Need help with Fly mode for mod
For my DBZ mod I have a fly mode that I made. The problem is that if you die with fly mode on, when you respawn you will have "less gravity" than normal. Meaning you can jump high, etc. I've tried placing:
SetPhysicsFlags(player, 0x1);
ClearPhysicsFlags(player, 0x4000);
Flags in the killed section of the fly COG, killed section of Kyle COG, also startup, newplayer, init_kyle, and in the pulse section next to the other clear flag verbs. Someone pleeease help!! Just tell me the correct COG verb and where to place it. Thanks.
I am not too sure how to help ya there. But how about using my cog I use. It used ti support good keys, but i dunno why anymore. But this will do the less gravity thing, but when you die airborn you fall and splat onto the ground. Hope this helps.
# Jedi Knight Cog Script
#
# Fly.COG
#
# INVENTORY SCRIPT - Fly - Flying Mod. Made by Zuk
#
# [CYW & YB]
#
# (C) 2000 Planet Gohan Editing Productions All Rights Reserved
symbols
thing player
int effectHandle=-1
vector thrust local
message activated
message pulse
message killed
int mode local
sound goggleActivate=
sound goggleDeactivate=
end
# .................................................. ......................................
code
activated:
player = GetSourceRef();
mode = GetSenderRef();
if(GetInv(player, 41))
{
if(IsInvActivated(player, 41) == 0)
{
if(GetInv(player, 13) > 0)
{
// Print("Fly on");
jkPrintUNIString(player, 254);
SetInvActivated(player, 41, 1);
PlaySoundThing(goggleActivate, player, 1.0, -1, -1, 0x80);
SetPulse(.2);
}
else
{
// Print("Outta Power ");
jkPrintUNIString(player, 256);
PlaySoundThing(goggleDeactivate, player, 1.0, -1, -1, 0x80);
}
}
else
{
// Print("Darn, I gotta let go");
SetPhysicsFlags(player, 0x1);
SetInvActivated(player, 41, 0);
if(!ClearPhysicsFlags(player, 0x2000)) DisableIRModes();
PlaySoundThing(goggleDeactivate, player, 1.0, -1, -1, 0x80);
if(effectHandle!=-1) freeColorEffect(effectHandle);
SetPulse(0);
}
}
Return;
# .................................................. ......................................
pulse:
ChangeInv(player, 13, -5);
if(SetPhysicsFlags(player, 0x2000) != 0)
{
// Print("Fy outta power");
ClearPhysicsFlags(player, 0x1);
SetInvActivated(player, 41, 1);
PlaySoundThing(goggleDeactivate, player, 1.0, -1, -1, 0x80);
if(!IsInvActivated(player, 23)) DisableIRModes();
if(effectHandle!=-1)
freeColorEffect(effectHandle);
SetPulse(0.0);
}
Return;
# .................................................. ......................................
killed:
player = GetLocalPlayerThing();
if(GetSenderRef() != player) Return;
if(IsInvActivated(player, 41) == 1)
{
SetPulse(0);
SetInvActivated(player, 41, 0);
DisableIRModes();
if(effectHandle!=-1) freeColorEffect(effectHandle);
}
Return;
end
------------------
---"Sometimes...even dying for a good cause is worth it. But chin up...when I do...Wish me back...ok." -Zuk (During the Battle with Vehchsurk)---
The Wild Leader, Founder, and Animator of the Wild West TC!
Gee, thanks for giving me your wonderful fly COG that is nothing but a fly hack. That will still do the same thing.
The_New_Guy
10-02-2000, 06:37 AM
Try putting SetPhysicsFlags(player, 0x1); in the newplayer: section. I think you want to set those flags at respawn not at death.
Well, that fly hack you say is how everyone else can fly without screwing around too much with the stuff.
So thanks for being so conciderate. I tried to help.
------------------
---"Sometimes...even dying for a good cause is worth it. But chin up...when I do...Wish me back...ok." -Zuk (During the Battle with Vehchsurk)---
The Wild Leader, Founder, and Animator of the Wild West TC!
ZF_Ubuu
10-04-2000, 02:14 PM
just ask someone who has made a good dbz mod for the fly cog like zf goku are shred18..by the way you got a message board for this dbz mod cuz u have to see shreds you dont stand a chance if you cant even do your own coggin
zagibu
10-04-2000, 03:26 PM
well, you have to add a killed message in your fly cog...try something like this:
killed:
player=GetLocalPlayerThing();
if(GetSenderRef()!=player) return;
if(player is flying)
{
SetPhysicsFlags(GetSenderRef(), 0x1);
ClearPhysicsFlags(player, 0x4000);
}
you'll jsut have to set a condition in the second ifloop...try adding a new bin and activate it, when player is flying...so you could check it with (if GetInv(player, bin)==1)...
zagibu
10-04-2000, 03:29 PM
ah, i see now...Zuk already posted the same thing...well, learn from his cog, that's the way it works...look at the killed section...you might have set some variables wrong...
BTW: why DBZ? there are already so many mods about DBZ out there...
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.