Raised This Month: $ Target: $400
 0% 

Problem with "register_touch"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kushfield
Member
Join Date: Jan 2017
Location: Estonia
Old 11-16-2018 , 10:24   Re: Problem with "register_touch"
Reply With Quote #9

It gets printed only in the center because thats how big you have set the entity size (entity_set_size( iEntity, Float:{ -1.0, -1.0, -1.0 }, Float:{ 1.0, 1.0, 36.0 } ); )
This means the entity size is 1 unit in each direction from the center (except upwards, which is 36)

If you want to print the text just once, you need to create some variable that stores if players have already got the message or not, then check and set that variable's value in the touch callback. Touch gets called on every frame where the object is touched.
Kushfield 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 07:31.


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