AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FM_Touch (https://forums.alliedmods.net/showthread.php?t=225349)

ironskillz1 09-03-2013 14:28

FM_Touch
 
How can i detect if someone is touching a speciel sprite like
Code:

sprites/white.spr
in FM_touch?

ConnorMcLeod 09-03-2013 17:01

Re: FM_Touch
 
Never use FM_Touch and pfnTouch, rather use register_touch

For your sprite, sprite ENTITY needs to have a size and a solid_* property correctly set.

ironskillz1 09-04-2013 09:43

Re: FM_Touch
 
How can i make this Shoot laser code to a sprite entity ?

Sorry im new to making sprite entity :/

Need a good exemple or a tutorial

Code:

stock Player_ShootLaser(iPlayer)
{
        new iPlayerOrgin[3]
        get_user_origin(iPlayer, iPlayerOrgin, 3)
       
        message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
       
        write_byte(TE_BEAMENTPOINT)
        write_short(iPlayer | 0x1000)
        write_coord(iPlayerOrgin[0])
        write_coord(iPlayerOrgin[1])
        write_coord(iPlayerOrgin[2])
       
        write_short(Lasersprite)
        write_byte(0)                             
        write_byte(10)                           
        write_byte(1)
        write_byte(5)                         
        write_byte(0)
       
        static r, b;
        r = random(256)
        b = random(256)
       
        write_byte( r)
        write_byte( 0)
        write_byte( b)
       
        write_byte(255)                           
        write_byte(10)                             
        message_end()
}


akcaliberg 09-04-2013 11:31

Re: FM_Touch
 
lasermine plugin might help you

ironskillz1 09-04-2013 14:49

Re: FM_Touch
 
Nah that didnt help me :/
I want to create so when you touch in the function
Code:

register_touch


All times are GMT -4. The time now is 19:08.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.