![]() |
|
|
#1 |
|
I need some help with my mutator
I'm writing a little Mutator here where I add a Laserpointer to certain classes which tells Rocketturrets and unlogged homingmissiles where to shoot at.
The Rocketturret part is done (See picture) but I still have some issues with the homing-thingy (I actually thought that 1 would be the easy part )The thing is, I everytime the Laserpointer hits something, it creates an actor there. Now my problem is, I don't get the missiles spotting that actor! I tried mith the GetNamedActor-function from the gameutil class, but somehow... I really don't know what to do? Can somebody pls help me? Last edited by [GDC]Faust; 7th May 2004 at 04:58 AM. |
|
|
|
|
|
#3 |
|
k, I see your point here
Ok, in the Mutator-class I gave the gunner a modified Rocketlauncher and the LaserPointer: Code:
function ModifyPlayer(Pawn Other)
{
Other.GiveWeapon("LaserPointer.PointerRifle");
if(Other.IsA('Gunner')
{
Other.GiveWeapon("LaserPointer.LaserRocketLauncher");
}
if ( NextMutator != None )
NextMutator.ModifyPlayer(Other);
}
![]() Code:
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if(Other.IsA('RocketLauncher'))
return false;
Return True;
}
Code:
ProjectileClass(1)=Class'LaserPointer.LaserRocketProjectileAlt' Code:
class LaserRocketProjectileAlt extends RocketProjectileAlt;
function Timer()
{
local LaserRocketProjectileDrunken RD;
local RocketProjectileSeeking RS;
local Actor DummySE;
local vector OffsetDir;
if( PaintedTargets[i]!=None )
{
RS = Spawn( class'RocketProjectileSeeking', Owner,, Location, Rotation );
RS.Index=i;
RS.SetTarget(PaintedTargets[i]);
}
else
{
switch(i)
{
case 0: OffsetDir.X=1.0; OffsetDir.Y= SpreadOffset; OffsetDir.Z= SpreadOffset; break;
case 1: OffsetDir.X=1.0; OffsetDir.Y=-SpreadOffset; OffsetDir.Z= SpreadOffset; break;
case 2: OffsetDir.X=1.0; OffsetDir.Y=-SpreadOffset; OffsetDir.Z=-SpreadOffset; break;
case 3: OffsetDir.X=1.0; OffsetDir.Y= SpreadOffset; OffsetDir.Z=-SpreadOffset; break;
}
If(!DummySE) //the actor created at the pointer's destination
DummySE = class'UtilGame'.static.GetNamedActor(Instigator, 'LaserDummy'); //the function I thought would recognise this actor
else
DummySE = None;
RD = Spawn( class'LaserPointer.LaserRocketProjectileDrunken', Owner,, Location, rotator(OffsetDir >> Rotation) );
RD.Index=i;
if(DummySE?)
{
RS = Spawn( class'RocketProjectileSeeking', Owner,, Location, Rotation );
RS.Index=i;
RS.SetTarget(DummySE);
}
RD.SetupData();
RD.SetCorrectLocation();
}
if (++i < ArrayCount(PaintedTargets))
SetTimer( 0.12, false );
}
defaultproperties
{
SpreadOffset=0.040000
Speed=250.000000
MaxSpeed=250.000000
Physics=PHYS_Falling
DrawType=DT_StaticMesh
StaticMesh=StaticMesh'343M.Projectiles.Rocket_Shell'
LifeSpan=15.000000
AmbientGlow=96
bCollideActors=False
bBounce=True
}
Help me...
|
|
|
|
|
|
#4 |
|
Oh, I forgot to ad the LaserRocketProjectileDrunken-Class (Man those names are gettin' longer and longer...) but it's not necessary in my opinion, since I only added the SetTarget function from the RocketProjectileSeeking-Class and took over some things from the tick-function there so that the drunken missiles could seek for the LaserDummy (Y'know, the thing that's created at the end of the beam).
I'm working on this class later on, when I get the Missile to recognise the Dummy (What's my main concern right now) |
|
|
|
|
|
#5 |
|
Hm it works now
I still need some further coding though.... I wonder if it works online...
|
|
|
|
|
|
#6 | |
|
Quote:
but no clue what this would be good for (nor what makes u do it)And sorry, i dun have the time/experiance to quickly/effeciently help you If it works online? U know that ![]() (if u can find a server which runs ur mut)
__________________
Last edited by iCQ; 5th May 2004 at 06:23 PM. |
||
|
|
|
|
#7 | |
|
Quote:
In general I'm teaching myself some Unrealscript with those mutators, and the SmartMines run by default now on our GDC-Server (Though I don't think our Admins would run this one, ok for testing well )What makes me do this? Hell, coding is fun! At least in my eyes... Y'know, it's all part of a big project for XMP i'm running right now
|
||
|
|
|
|
#8 |
|
OOOHHHH yeah yeah yeah!!!!
DAMNIT i knew it u were onto some TOTALLY COOL! OH MAN I LOVE THAT! And u should check the go'ol tribes someday (if u have the time). U trying to make (making) a spotter thingy as like in for example Battlefield Desert combat; a sniper spots a target then someone can use a mortar or a nuke or whatever from the base to bombard that spot from long range... WAY COOL! Sorry for a second i thought u were into dev some kind of aim aid... sorry i should have know better (hence your name)...
__________________
|
|
|
|
|
|
#9 |
|
Just wanna say: It's finished. If anyone is interested in this Mut, just post here, and I'll load it up as an attachement.
|
|
|
|
|
|
#10 |
|
Please do so (tho i go get it ar ur place
)GJ und aufwiedersehen!
__________________
|
|
|
|
|
|
#11 | |
|
Quote:
I'll post it a bit later, found some things that still needed improvement. |
||
|
|
|
|
#12 |
|
Jawol!
Yes... pls dont release it in haste... we got all the time of the world... Bis später
__________________
|
|
|
|
|
|
#13 |
|
Oh, it's added.
|
|
|
|
|
|
#14 | |
|
Quote:
__________________
|
||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|