No announcement yet.

Bombing run goal problem

  • Filter
  • Time
  • Show
Clear All
new posts

    Bombing run goal problem

    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.


    I guess nobody else know either, it might be the first time anyones made a larger goal?


      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.


        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


          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;
          	if ( Role == ROLE_Authority )
          		DefenderTeamIndex = Team;
          		// spawn my scoring hole
          		MyHole = Spawn(class'MyBombDeliveryHole',self,,Location,Rotation);
          		// check if has shootspots
          		for ( N=Level.NavigationPointList; N!=None; N=N.NextNavigationPoint )
          			if ( (ShootSpot(N) != None) && (ShootSpot(N).TeamNum == Team) )
          				bHasShootSpots = true;
          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).


            Yeah I was going to say all that too, but I didnt want to appear too clever :weird:


              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.


                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?



                  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.


                    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

                    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:


                      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!


                        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.


                        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.


                          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.


                            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.


                            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


                              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.