PDA

View Full Version : Bombing run goal problem



legacy-Buckyfg
06-30-2003, 11:26 PM
Ok, I have my goals setup but I've made them alot bigger than default and cant find the setting to expand the center area that registers the goal. meaning the part that scores is just a small area in the center of my big goal.

The collison radius of the Xbombgate mesh doesnt seem to do anything, any ideas?

Also if I jump through the goal w/ball, even up to where the small area is I dont score anything when I should be scoring 5 points?

EDIT: I think I just wasnt reaching the actual goal when I jumped through with the ball, I presume the points will still work once I get the goal radius larger.

HELP

legacy-Buckyfg
07-01-2003, 04:47 PM
I guess nobody else know either, it might be the first time anyones made a larger goal?

legacy-Mr Evil
07-01-2003, 10:46 PM
To alter the size of the hole requires some scripting. If that isn't a problem for you then I can tell you how to go about it.

legacy-Buckyfg
07-01-2003, 11:35 PM
Originally posted by Mr Evil
To alter the size of the hole requires some scripting. If that isn't a problem for you then I can tell you how to go about it.

I dont know how to script , never tried yet. BUT I learn fast and I HAVE to figure this out. I'm a web designer as well and deal with html, java script e.t.c but not real programming script.

If you can let me know how to do it, I'll give it a shot.
would it mess up compatibility at all?


Let me know, thanks Mr Evil

legacy-Mr Evil
07-02-2003, 08:25 AM
It won't affect compatibility. I had to script a new goal for a map I did and it has never caused any problems.

You need to make two new classes for this, which in this case can be done in UEd. You will need to de-select 'Placeable classes only' in the actor browser, then go to 'Decorations->xBombDeliveryHole' and right-click on it then on 'new'. Give it a name, e.g. 'MyBombDeliveryHole' and give it a package name of 'MyLevel'. In the new window that pops up, click on 'Tools->Compile changed' to compile it (no actual scripting required for this one). Now right-click on the new class in the actor browser and open its properties. Change its drawscale. This is the size of the hole.

Next, make a new 'xBombDelivery' in the same way as above, but before compiling it, some scripting needs to be done to tell it to use the new hole. If you look at the original 'xBombDelivery' script you will see that there is a function called 'PostBeginPlay()'. This function is automatically called when the actor first comes into existence. In that function you can see where it spawns the hole. You need to override this function so it spawns your hole class instead of the original one, by putting this code in you new class:

simulated function PostBeginPlay()
{
local NavigationPoint N;

Super.PostBeginPlay();

if ( Role == ROLE_Authority )
{
DefenderTeamIndex = Team;

// spawn my scoring hole
MyHole = Spawn(class'MyBombDeliveryHole',self,,Location,Rot ation);

// check if has shootspots
for ( N=Level.NavigationPointList; N!=None; N=N.NextNavigationPoint )
if ( (ShootSpot(N) != None) && (ShootSpot(N).TeamNum == Team) )
{
bHasShootSpots = true;
break;
}
}
SetTeamColors();
}
It's exactly the same as the original code except it now spawns the new hole.

Now compile it and place one in you map. Save the map (note that you must have one in your map when saving or the new classes will not be saved with the map).

Wulf Sternhammer
07-02-2003, 09:05 AM
Yeah I was going to say all that too, but I didnt want to appear too clever :eek: :weird:

legacy-Buckyfg
07-02-2003, 10:58 AM
Mr Evil, I will try this tonite. thanks alot for taking the time to reply with this.

I have a few questions even before I try it. when you change the drawscale and it will be a guess at first (or would it just be the same as the larger scale of the Xbombdelivery mesh?) can I just test it and go back and change it e.t.c?

Also you say make sure to place one in your map or you'll loose it just like regular mylevel stuff, but arent they both scripts? how do I get the actual Xbombdelivery mesh to use the new script?

I'm sure it'll make more sense once I start on it later today.


Really appreciate the help. I didnt want to shrink the goals down to default on this one.

WulfSternhammer, you knew that too? or are you suprised like me at the cleverness of Mr Evil. :)

legacy-Buckyfg
07-02-2003, 05:35 PM
K I tried it and got halfway there then got lost.


"Next, make a new 'xBombDelivery' in the same way as above"

that is the exact same as xBombDeliveryhole I presume? so I made another one after the first and went to edit script but its almost empty unlike the original , so do I just paste that code under whats in there already? i tried but it all came in black.

Also I looked at the original xBombDeliveryhole script by right clicking and "edit script" but there isnt any PostBeginPlay in there at all.

also I make two with the same name? and if theres only one new one left do I just place it in the map like a zoneinfo?

Thanks

legacy-Mr Evil
07-02-2003, 08:01 PM
Don't make two new xBombDeliveryHoles, make one plus one xBombDelivery (NavigationPoint->JumpDest->JumpSpot->GameObjective->xBombDelivery). Copy and paste the code into that one. Give it any name you want, e.g. 'MyBombDelivery'.

Then place the new 'MyBombDelivery' in the map instead of the normal goals.

Wulf Sternhammer
07-03-2003, 04:44 AM
you knew that too? or are you suprised like me at the cleverness of Mr Evil

Well I was going to say the 2nd, but think Id better take the 5th :D

Hard to figure people can know all this stuff but really cool to see that they'll take the time to answer queries in such detail :up:

legacy-Buckyfg
07-03-2003, 10:22 AM
great Mr Evil I'll try that asap. thanks a ton for taking the time on this one. its a very important aspect of the map.

WulfSternhammer I totally agree!

legacy-Buckyfg
07-03-2003, 11:06 AM
UPDATE: its not working at all. when you make a NEW hole or xbombdelivery the code is basicly empty. and when you open the code for the the new Myxbombdelivery it shows the code for the hole.

I've even tried copying all the code from the original xbombdelivery into the new one than changing the name of what hole to spawn in the code you showed here but nothing.

and if I try to just paste only rhe code from this page into the basicly empty page it makes most of the code a comment tag I think.

Lost

IF you want I can send you the map to check out. it wont have the new xbombdelivery e.t.c because it wont even place anything when I try.

legacy-Mr Evil
07-03-2003, 11:41 AM
It is normal for the new scripts to be empty. UScript uses 'object oriented programming' which means that subclasses automatically 'inherit' everything from their superclass even though you don't see it.

Make sure you compile the script after pasting in the code (it may show as the green comment colour, but it's not really, it's just the editor being a bit slow).

After that you should be able to place a MyBombDelivery in the map, and it should look exactly like a normal goal. When you test the map it should behave exactly the same too.

legacy-Buckyfg
07-03-2003, 04:10 PM
I've done it excatly as you said and when I try to place the myxbombdelivery in the map nothing happens.

When you make new ones it adds the "x" in the name, I tried adding the x as well in the code you pasterd but it didnt work either.

edit:

Heres a pic of the code after I edited the new myxbombdelivery and compiled it.

the other one in the menu was the original to compare

http://www.aengusfinnan.com/temp-bucky/myxbombdelivery.jpg

legacy-Buckyfg
07-03-2003, 04:33 PM
When I do like you said it seems to only show the hole code everytime. when I load up the script of the original hole then the delivery, it registers as two seperate files but when I right click on MY bombdelivery it shows the code for the hole.

you know what I mean? official ones are seperate but both of mine go to the myxbombdeliveryhole.

legacy-Buckyfg
07-04-2003, 11:11 AM
I must be doing one little thing wrong but I have no idea what that is. hopefully Mr Evil will see that pic I posted and know what I did wrong. I really apreciate the help BTW.

legacy-Mr Evil
07-04-2003, 12:03 PM
I can see a few problems:
You pasted the code into the new xBombDeliveryHole when you should be pasting it into the new xBombDelivery.
The formating seems messed up. If you paste the code from the earlier post into Notepad first, then copy and paste that into UEd, it will fix the formating.
If clicking on a script seems to show the code for a different one, close all the scripts then open the one you want (from 'file->close'). It's a bug in UEd.

legacy-Buckyfg
07-04-2003, 02:56 PM
Ok Mr Evil, I got it to place my new bombdelivery in, so thats set up (thank you) but how can I see how big the hole is? I changed the drawscale x=2.4 y=2.4=z=2.4 (on the hole properties in the actor browser) but I can still shoot the ball and have it just sit behind the goal and no score. if I aim in the middle it works.

I tried placing the just the hole only to see the size and it places a 6 sided circle sheet and its big enough to fill the goal but the delivery isnt doing it. so damn close now RGHHHHH

this is damn nightmare, even when and IF I get this to work properly I need to make it so when you jump through you score the increased points and NOT DIE. Right now if I jump though I dont score at all, obviously the hole is not getting bigger when spawned by the delivery but it LOOKS big enough if I just place the hole by itself.

legacy-Buckyfg
07-04-2003, 05:21 PM
I have made the goal mesh (delivery) a little smaller but still quite a bit bigger than the original and used my new actors and it seems to be working!!!!

A-f'nMEN so hopefully its done! we'll have to test a bunch but thanks to Mr.Evil it is working.

Still would like to see the excat hole size its creating and where its placing it.

Also how do you stop people from dieing when they jump through?


Thanks to all who have helped me and especially Mr.Evil!!