Scripts / Objects that hit and hurt ... question

Author
Message
warlock12
8
Years of Service
User Offline
Joined: 12th Sep 2016
Location: Argentina
Posted: 8th Jun 2017 15:52 Edited at: 8th Jun 2017 15:53
Sorry for the question because it may sound silly ... you can make a moving object because of the "Impact" with the player ... it will hurt ... I guess ... but I can not find the way .. It must be so basic ... But I can not do it !!!
Gracias anticipadas!!! (Thanks in advance!!!)
The game is a serious thing (El juego es una cosa seria)
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Jun 2017 16:42
easiest solution is based on the player's distance
so
if GetPlayerDistance(e) < 70 then
HurtPlayer(e,1)
end
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
warlock12
8
Years of Service
User Offline
Joined: 12th Sep 2016
Location: Argentina
Posted: 8th Jun 2017 17:59
Wow That simple !!! I've been a fool !!! Thanks smallG for the help and the incredible speed in responding ... Thanks again ... a few hours ago I broke my head but did not think about the distance !!!!
Warlock
The game is a serious thing (El juego es una cosa seria)

Login to post a reply

Server time is: 2024-12-23 06:02:52
Your offset time is: 2024-12-23 06:02:52