NewsUnrealEdFilesModsFragBULiandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > BeyondUnreal > Games > Unreal Series > Unreal 2

Closed Thread
 
Thread Tools Display Modes
Old 5th May 2004, 06:36 AM   #1
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
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?
Attached Thumbnails
Click image for larger version

Name:	Shot00080.jpg
Views:	59
Size:	39.5 KB
ID:	77235  
Attached Files
File Type: zip LaserPointer.zip (16.7 KB, 6 views)

Last edited by [GDC]Faust; 7th May 2004 at 05:58 AM.
[GDC]Faust is offline  
Old 5th May 2004, 10:39 AM   #2
IndianPsycho
Registered user
 
IndianPsycho's Avatar
 
Join Date: Feb. 17th, 2004
Posts: 570
Some code would be nice. Solving coding problems without seeing the actual code is hard...
__________________
#UTXMP
IndianPsycho is offline  
Old 5th May 2004, 01:36 PM   #3
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
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);

}
Of course, after taking the old Rocketlauncher away

Code:
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)

{   
   if(Other.IsA('RocketLauncher'))
	return false;
  

   Return True;
}
So far, so good. Because the Checkreplacement-function removes all sub-classes also, I had to copy all the code from the RocketLauncher-class into a new one, just to modify this line:

Code:
ProjectileClass(1)=Class'LaserPointer.LaserRocketProjectileAlt'
Now, we come to the tricky part: letting the Missile know there's an actor where the Laserpointer is pointing at. I modified the Timer-function in order to achieve this:

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
}
Unfortunately, that doesn't work. I am such a noob. Help me...
[GDC]Faust is offline  
Old 5th May 2004, 01:42 PM   #4
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
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)
[GDC]Faust is offline  
Old 5th May 2004, 07:10 PM   #5
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
Hm it works now I still need some further coding though.... I wonder if it works online...
[GDC]Faust is offline  
Old 5th May 2004, 07:20 PM   #6
iCQ
Softice/MASM reverse engineer
 
iCQ's Avatar
 
Join Date: Dec. 29th, 2003
Location: The Netherlands
Posts: 326
Quote:
Originally Posted by [GDC]Faust
Hm it works now I still need some further coding though.... I wonder if it works online...
I like ur work 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 07:23 PM.
iCQ is offline  
Old 5th May 2004, 07:43 PM   #7
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
Quote:
Originally Posted by iCQ
I like ur work but no clue what this would be good for (nor what makes u do it)
I heard in tribes 2 there's such a Pointer, where you can use your Turrets and Mortarfusions (WTF is that btw? I don't know Tribes 2) as a long-range-weapon.

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
[GDC]Faust is offline  
Old 5th May 2004, 08:40 PM   #8
iCQ
Softice/MASM reverse engineer
 
iCQ's Avatar
 
Join Date: Dec. 29th, 2003
Location: The Netherlands
Posts: 326
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)...
__________________
iCQ is offline  
Old 7th May 2004, 04:57 AM   #9
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
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.
[GDC]Faust is offline  
Old 7th May 2004, 05:03 AM   #10
iCQ
Softice/MASM reverse engineer
 
iCQ's Avatar
 
Join Date: Dec. 29th, 2003
Location: The Netherlands
Posts: 326
Please do so (tho i go get it ar ur place )

GJ und aufwiedersehen!
__________________
iCQ is offline  
Old 7th May 2004, 05:05 AM   #11
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
Quote:
Originally Posted by iCQ
Please do so (tho i go get it ar ur place )

GJ und aufwiedersehen!
Achtung!

I'll post it a bit later, found some things that still needed improvement.
[GDC]Faust is offline  
Old 7th May 2004, 05:09 AM   #12
iCQ
Softice/MASM reverse engineer
 
iCQ's Avatar
 
Join Date: Dec. 29th, 2003
Location: The Netherlands
Posts: 326
Jawol!

Yes... pls dont release it in haste... we got all the time of the world...

Bis später
__________________
iCQ is offline  
Old 7th May 2004, 06:33 AM   #13
[GDC]Faust
Goblin Hunter
 
[GDC]Faust's Avatar
 
Join Date: Apr. 29th, 2004
Posts: 314
Oh, it's added.
[GDC]Faust is offline  
Old 9th May 2004, 02:10 AM   #14
iCQ
Softice/MASM reverse engineer
 
iCQ's Avatar
 
Join Date: Dec. 29th, 2003
Location: The Netherlands
Posts: 326
Quote:
Originally Posted by [GDC]Faust
Oh, it's added.
Roger that! (i'll check it in a day or so)
__________________
iCQ is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:27 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer