Gaming Zone > Killing Floor Mod
KF Mod Version 3 - progress
Snipe34:
--- Quote from: N3Cr0 on August 13, 2011, 16:12 ---...about the 3 firingmodes thing:
I just have taken a look in the actor class section of the UnrealEd. I confess this game is very complex - maybe too complex for me, but after searching a long while I finally found something interesting.
What I want is to give Snipe some inspiration...
Well, just let me tell about my idea:
Let's say for the first we make a simple flashlight, maybe based on the pistol script located in
Actor/InventoryAttachment/WeaponAttachment/xWeaponattachment/KFWeaponAttachment/SingleAttachment
Maybe the flashlight code will look like this:
--- Code: ---class SingleAttachment extends KFFlashlightAttachment;
var Actor TacShine;
var Effects TacShineCorona;
var bool bBeamEnabled;
// Prevents tracers from spawning if player is using the flashlight function
simulated event ThirdPersonEffects()
{
if( Flashlightswitch==1 )
return;
Super.ThirdPersonEffects();
}
simulated function Destroyed()
{
if ( TacShineCorona != None )
TacShineCorona.Destroy();
if ( TacShine != None )
TacShine.Destroy();
Super.Destroyed();
}
simulated function UpdateTacBeam( float Dist )
{
local vector Sc;
if( !bBeamEnabled )
{
ChangeIdleToSecondary();
if (TacShine == none )
{
TacShine = Spawn(Class'Single'.Default.TacShineClass,Owner,,,);
AttachToBone(TacShine,'FlashBone3P');
TacShine.RemoteRole = ROLE_None;
}
else TacShine.bHidden = False;
if (TacShineCorona == none )
{
TacShineCorona = Spawn(class 'KFTacLightCorona',Owner,,,);
AttachToBone(TacShineCorona,'FlashBone3P');
TacShineCorona.RemoteRole = ROLE_None;
}
TacShineCorona.bHidden = False;
bBeamEnabled = True;
}
Sc = TacShine.DrawScale3D;
Sc.Y = FClamp(Dist/90.f,0.02,1.f);
if( TacShine.DrawScale3D!=Sc )
TacShine.SetDrawScale3D(Sc);
}
simulated function TacBeamGone()
{
if( bBeamEnabled )
{
ChangeIdleToPrimary();
if (TacShine!=none )
TacShine.bHidden = True;
if (TacShineCorona!=none )
TacShineCorona.bHidden = True;
bBeamEnabled = False;
}
}
--- End code ---
You also have to add a flashlight script where you attach this script to (it should have a function/variable called "Flashlightswitch").
And you have to find a way to bind that flashlight to a button on the keyboard.
The Flashlight must not be scripted like a weapon - It should work whenever you press your light key.
[...this should be enough for the beta version of firingmode 3 ;) ...]
If you have done all this I MAYBE have an idea for the next step - but to explain this step in short: you should find a way to make this flashlight case-sensitive, which means you can only turn it on if you have changed to a weapon which ALLOWS a flashlight
...I hope I could help you a little bit
--- End quote ---
Your offer is much appreciated.
I solved the Pinzgauer mounted mgs problem using your approach - intuitive, copy/pasting code to code. Luck made it work and also some experience of code. Your approach is similar to mine and I agree I think add a Var is the beginning of that solution.
If you want to help I suggest you change some UT/KF code on some object or weapon, compile it with UCC. Then see how UT reacts to your changes. In that way you learn how UT reacts, and add knowledge to your intuitive approach.
Thanks to Epic UT, you don't have to learn to write code. Only first understand basically code framework. From there extend the nearest object or item to what you want, make changes in the extension to get exactly what you want. I looked at Runescape code, even twi code to get some clues, but I still have none. For 3 modes, I don't know where to start.
A separate button, a var linking to the keyboard, and so a separate piece of code. Ic what you're saying, but idk how to write that. The way light on code is written, it's a firemode: instead of shooting bullets it turns on the light. And raise is similar - another firemode - doesn't shoot, just raises the gun. UT code was written for 2 firemodes only. So extend won't work. New stuff has to be written.
Hamada can do that.... Saturday night and I haven't heard from him yet xd
Snipe34:
still nothing... testing in july... never said which july - never said which weekend... no mrs C code, no respawn code, no zombie code.
My fault... i never should have told hamada, relax, take it easy, don't rush, everything's cool XD
Edit:
after that rant... i think he's working on it but he doesn't tell me... i was delayed because... i can't do this because... I don't know. I wait, wait, wait, wait, wait, wait, wait, wait, wait... i get pissed.
Vanico:
Sounds great!
(Do not release it now, do not release it now, do not release it now, back home please, back home please, back home please oh shit v3v3v3v3v3v3v3 OMG)
N3Cr0:
--- Quote from: Snipe34 on August 14, 2011, 01:04 ---If you want to help I suggest you change some UT/KF code on some object or weapon, compile it with UCC. Then see how UT reacts to your changes. In that way you learn how UT reacts, and add knowledge to your intuitive approach.
--- End quote ---
The UT code drives me mad :/
I also tried to work around the broken welder display if you play the game under Linux - I wanted to copy the welder display script into the script for the HUD. Well, finding the necessary lines was easy, but I don't know how to port it to the HUD script -.-
I have absolutely no idea what to write in a script :/
Snipe34:
--- Quote from: N3Cr0 on August 15, 2011, 15:02 ---
--- Quote from: Snipe34 on August 14, 2011, 01:04 ---If you want to help I suggest you change some UT/KF code on some object or weapon, compile it with UCC. Then see how UT reacts to your changes. In that way you learn how UT reacts, and add knowledge to your intuitive approach.
--- End quote ---
The UT code drives me mad :/
I also tried to work around the broken welder display if you play the game under Linux - I wanted to copy the welder display script into the script for the HUD. Well, finding the necessary lines was easy, but I don't know how to port it to the HUD script -.-
I have absolutely no idea what to write in a script :/
--- End quote ---
Number plates on vehicles uses similar script - similar problem. In V3 there are CCTV cameras and Unix Linux users will have the same problem with them. Problem is the Scripted Textures Unix that doesn't understand.
As I say, making something similar to a current weapon, or similar to some script is quite easy, just extend and modify. But something new needs coding knowledge or luck with copy/paste...
Try getting knowledge by experimenting extending and rebuilding with UCC, see how UT reacts. You may find an answer.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version