Announcement

Collapse
No announcement yet.

Scripting Question(s)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sofos
    replied
    Thanks immortius, that could be the problem. But then what LF said, about naming that a feature is so much easier that I will probably leave it that way.

    Leave a comment:


  • reemulmyu
    replied
    does it have hover over marine can you not just tell it to hold where u put it ,or place it somewhere like sentry and leave it or maybe have the sentry kit able to unplace it

    Leave a comment:


  • immortius
    replied
    I think you might need to change the code to ignore the marine the drone is ontop of. Maybe.
    Last edited by immortius; 15 Jun 2007, 09:02 PM.

    Leave a comment:


  • lightfoot
    replied
    If I am not mistaken, given the relatively low speed of the drone's projectile, any algorhythm trying to completely prevent friendly fire would have to be complicated, or a real clever piece of coding at least.

    Yes, the flamer does such a thing, but I have no idea how.

    Especially the flamer code, I looked inside it for severeal times, and still I must admit I understand nearly nothing of it.



    But on the other hand, I wouldn't go too many miles trying to fix THAT problem. I mean this may be a good occasion where you can 'fix something by making it a feature'...

    I think it is quite funny that the drone shoots you sometimes.

    It will heal you again soon.

    And the FF gets a lot less if you always have an eye on where your drone is, and struggle to not get inbetween too much.

    I think its OK if an item is strong, but forces you to adjust your style of playing.

    In terms of gameplay, the drone bots are just too mighty, if they don't have a mighty drawback.


    And remember, these are just prototypes etc. No room in that small bot for sentry-like friend-foe-recognition etc.

    Leave a comment:


  • sofos
    started a topic Scripting Question(s)

    Scripting Question(s)

    Some time ago I started a scripting project, mainly creating new weapons in order to get familiar with Unreal Scripting. Then Lightfoot showed me the drone mutator for UT2004 and we decided to port it to AS. Although it worked properly, there was one thing that was really annoying FF. I couldn't fix it and so I left it in my hdd. But well, I guess I can ask here for some help, even if it is never used.
    Imagine the marine, on top of his/her head (32 uu if i remember correctly) is a drone, that rotates constantly when the owner-marine doesn't move, and shoots all aliens that enter it's range (let's say 1024 uu). Although the target class is AoAlienPawn from the moment the drone takes the target until it shoots marines often get in the way and that is causing massive friendly fire.
    See below (awesome pic BTW )
    forum1.GIF
    forum2.GIF
    So probably a SafeFire function is needed. I tried some stuff but didn't work. The problem was that it was never safe to fire so the drone didin't shoot at all . Now I don't remember exactly what I tested, but it was similar with the pulsegun SafeToFire function. Targeting and shooting is done from inside Timer:
    Code:
    G=AoGameInfo(Level.Game);
    
    	for (i=0;i<32;i++)
    	{
    		if (G.MarineList.Marine[i]!=none)
    		{
    			// get a marine
    			P = G.MarineList.Marine[i].MarinePawn;
    
    			// check if he's in range of the flamer
    			Difference = P.Location - Instigator.Location;
    
    			if (VSize(Difference) < 350)
    			{
    				// check he's not in front of us
    				d = Difference dot vector(Instigator.Rotation);
    
    				if (d > 0.72)
    					return false;
    			}
    		}
    	}
    	return true;
    }
    The code compiled. I tried different values and from the log it was clear that the function was called correctly, but never returned True
    Like that
    Code:
     
    simulated function Timer()
    some if's here to prevent Access None
    
     if(SafeToFire())
    {
      log(" ");
      fire...
      do stuff
    }
    else
    
    log("....");
    ......
    Back then I read the UnrealWiki but unfortunately now I have forgotten most of the stuff about vector etc. Because I am sure that I have made a noobish mistake who will help me?


    Also searching the forum for help I found MANY unfinished projects, maps, modelling

    Thanks Sofos
Working...
X