Raised This Month: $ Target: $400
 0% 

register_touch with a spawned env_sprite


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-15-2009 , 03:24   Re: register_touch with a spawned env_sprite
Reply With Quote #2

Store that sprite index when you create it :

g_iSprite = create_entity("env_sprite")
register_touch("env_sprite", "player", "Sprite_Touch")

public Sprite_Touch( iSprite , id )
{
if( iSprite == g_iSprite )
{
// do stuff

-edit-
If the function is never called, try to make the sprite SOLID_TRIGGER
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-15-2009 at 03:33.
ConnorMcLeod is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:59.


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