|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
LUA scripters?
I guess you all know about C++ scripts. But any guys here who are familiar with LUA?
|
#2
|
||
|
Code:
function hurtplayer(e) Detect = PlyrDist(e) Health = Health(e) if Detect < 100 then Health(-1) end end Last edited by Guest001; 06-28-2016 at 10:56 AM. |
#3
|
||
|
Add a counter to trigger
Code:
InjuryCount=0 function hurtplayer(e) Detect = PlyrDist(e) Health = Health(e) if Detect < 100 then Health(-1) InjuryCount=InjuryCount+1 end if Health > 1 and InjuryCount==5 then action(e,1) end end Last edited by Guest001; 06-28-2016 at 10:56 AM. |
#4
|
||
|
Hey, you know LUA? Is it similar to C++?
|
#5
|
||
|
LUA is easier and been around longer AFIK
|
#6
|
||
|
Yis. LUA is a easy language.
|
#7
|
||
|
I'm no expert, having limited time in this field but as I've come to understand it, it's like a universal secondary layer of control.
For instance, once a game engine's been compiled in C# or C++ you can modify it with LUA (if incorporated) without recompiling the whole thing. |
#8
|
||
|
I'm a prankster
Yeperoony. Here's the correct version. Code:
InjuryCount=0 function hurtplayer(e) Detect = PlyrDist(e) Health = Health(e) if Detect < 100 and InjuryCount<=5 then Health(-1) InjuryCount=InjuryCount+1 else Health > 1 and InjuryCount==5 then action(e,1) end end |
#9
|
||
|
The above is an example of the sort of error(s) an IDE might not pick up, so debugging code can still be reliant on a sharp eye.
|
#10
|
||
|
BTW I know next to nothing about C++ but I imagine it's similar in structure to a lot of programming languages and still uses Boolean as a basis for it's logic structure but is more complex than any other that I know of.
I don't think it was created from scratch, it's an ancestor of a previous language like basic or C# I think. Perhaps you know more about that than I do. |
#11
|
||
|
I know nothing bout the C family of programming language :V And i dont even wanna learn it. It is so tough and booooooooring. LUA is a way way way way better for me at least!
|
#12
|
|||
|
Stompen & City Ace, wondering if u can help me. I got this old BHD stat uploader for Neos Chronos v1.9.0. It's written in LUA script. I can't seem to make it work. It won't upload stats. I got this message...
Quote:
The uploader file you can download here. |
#13
|
||
|
I have no idea of it ;___;
|
#14
|
||
|
What makes the MEd so great is it really is fun in it's way, mainly because it's visual and it's not all booooooooring like C or as complex as LUA script either.
Last edited by Guest001; 07-24-2016 at 12:25 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|