Jump to content

Photo

Destroy an EWeapon


  • Please log in to reply
2 replies to this topic

#1 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 26 July 2013 - 10:54 AM

How exactly can I 'kill' any EWeapon on screen that's being clicked on by the mouse? Have a script that makes an ffc follow the mouse and also a script that checks for mouse clicks, but have no idea how to check for the EWeapon? I guess I'd have to use NumEWeapons(); or LoadEWeapon(int num); but have no idea how those work.

 

Edit: nevermind. I found it out myself :XD:


Edited by Avataro, 26 July 2013 - 12:19 PM.


#2 Mr. Z

Mr. Z

    Old Bastard is back!

  • Members
  • Real Name:Erik
  • Location:The Netherlands

Posted 26 July 2013 - 03:50 PM

Topics like these are the curse of the internet! :tard:

I know how to do this already, or to be more precise I would be able to make a script like this if I wanted to, but for the people who are interested I think it would be nice if you pasted your code so nobody else has to make a topic for the same question.



#3 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 26 July 2013 - 04:09 PM

            for(int i=1; i<=Screen->NumEWeapons(); i++){
                eweapon e = Screen->LoadEWeapon(i);
                if ( //condition here// ) {
                    e->DeadState = WDS_DEAD;
                }
            }

:D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users