Data Realms Fan Forums http://45.55.195.193/ |
|
Quick Lua Tips http://45.55.195.193/viewtopic.php?f=73&t=12052 |
Page 1 of 3 |
Author: | Ophanim [ Sun Aug 24, 2008 1:05 am ] |
Post subject: | Quick Lua Tips |
Data's crazy and Australian or something and -y is up. Team 1 is Green, Team 0 is Red. Anyone got anything else? |
Author: | Lord Tim [ Sun Aug 24, 2008 1:10 am ] |
Post subject: | Re: Quick Lua Tips |
Code: Constants: Activity. TEAM_1 0 TEAM_2 1 PLAYER_1 0 PLAYER_2 1 PLAYER_3 2 PLAYER_4 3 EDITING 2 RUNNING 3 OVER 6 Actor. AIMODE_NONE 0 AIMODE_SENTRY 1 AIMODE_PATROL 2 AIMODE_GOTO 3 AIMODE_BRAINHUNT 4 AIMODE_GOLDDIG 5 Controller. CIM_AI 2 List of functions lol: http://cortex.pastebin.com/f31593c76 |
Author: | AtomicTroop [ Sun Aug 24, 2008 10:46 am ] |
Post subject: | Re: Quick Lua Tips |
Ophanim, the inverted y is pretty much normal in all kinds of script languages, not only in DaTa's lua intepretation. For example, actionscript does it the same way too. To me, it feels more logical though. I mean, if it starts from upper left corner, of course it would go down as + and right as +. |
Author: | Daman [ Sun Aug 24, 2008 3:57 pm ] |
Post subject: | Re: Quick Lua Tips |
AtomicTroop wrote: Ophanim, the inverted y is pretty much normal in all kinds of script languages, not only in DaTa's lua intepretation. For example, actionscript does it the same way too. To me, it feels more logical though. I mean, if it starts from upper left corner, of course it would go down as + and right as +. What are you talking about? Also actionscript is just a crappy Flash language. |
Author: | war_man333 [ Sun Aug 24, 2008 4:13 pm ] |
Post subject: | Re: Quick Lua Tips |
Daman wrote: AtomicTroop wrote: Ophanim, the inverted y is pretty much normal in all kinds of script languages, not only in DaTa's lua intepretation. For example, actionscript does it the same way too. To me, it feels more logical though. I mean, if it starts from upper left corner, of course it would go down as + and right as +. What are you talking about? Also actionscript is just a crappy Flash language. Yeah, actionscript blows, it's not flexible at all and doesn't make much sense to me whatsoever. Also how come lua doesn't use brackets instead of the end stuff? |
Author: | FarvanTorna [ Sun Aug 24, 2008 4:26 pm ] |
Post subject: | Re: Quick Lua Tips |
Hey I've seen some crazy stuff with actionscript. |
Author: | Ophanim [ Sun Aug 24, 2008 4:34 pm ] |
Post subject: | Re: Quick Lua Tips |
AtomicTroop wrote: Ophanim, the inverted y is pretty much normal in all kinds of script languages, not only in DaTa's lua intepretation. For example, actionscript does it the same way too. To me, it feels more logical though. I mean, if it starts from upper left corner, of course it would go down as + and right as +. Or you can start in the ♥♥♥♥ center. |
Author: | Lord Tim [ Sun Aug 24, 2008 5:53 pm ] |
Post subject: | Re: Quick Lua Tips |
Ophanim wrote: AtomicTroop wrote: Ophanim, the inverted y is pretty much normal in all kinds of script languages, not only in DaTa's lua intepretation. For example, actionscript does it the same way too. To me, it feels more logical though. I mean, if it starts from upper left corner, of course it would go down as + and right as +. Or you can start in the fudge center. Which would require the game to do more calculations than it needs, and be a whole lot more complicated for anyone trying to code against it. It's a bunch easier when everything is generally positive. Plus, yeah, pretty much any computer graphics thing you use ever will have y+ as down. It's a convention. |
Author: | Ophanim [ Sun Aug 24, 2008 8:45 pm ] |
Post subject: | Re: Quick Lua Tips |
It's a dumb convention. |
Author: | Omni [ Mon Aug 25, 2008 3:45 am ] |
Post subject: | Re: Quick Lua Tips |
Wait, why are you confused about the +y down? What's confusing is the +x left. |
Author: | Grif [ Mon Aug 25, 2008 3:48 am ] |
Post subject: | Re: Quick Lua Tips |
Uh what? +X is right, not left. There's just no negative X. Scene wrap point and onward moves to the right. |
Author: | Omni [ Mon Aug 25, 2008 4:50 am ] |
Post subject: | Re: Quick Lua Tips |
Disregard, I stimulate receptacles. Apparently this grid in this article is a backwards grid for joint offset. http://www.datarealms.com/wiki/index.ph ... _Tutorials Why the backwards grid is given priority in the article I'll never know. Stupidity aside, there's always negative X. At least when you're talking relative. Relative to an actor at (300,100), an actor at (200,100) is off the x coordinate of the first by -100 pixels. |
Author: | Tea [ Mon Aug 25, 2008 4:51 pm ] |
Post subject: | Re: Quick Lua Tips |
Hey, need help with scene Lua. Is it possible to Have a Countdown (three minutes) that starts when an actor enters an area and results in the gibbing of another actor if it gets to 0? Seemed like the right place to put this. |
Author: | Ophanim [ Mon Aug 25, 2008 5:23 pm ] |
Post subject: | Re: Quick Lua Tips |
self.GibTimer Timer(); or something like that. This is in every lua file, so check there, as I am too lazy. Then just run a check if self.GibTimer IsPastSimMS(3 minutes of milliseconds here ) then blah blah. |
Author: | robowurmz [ Mon Aug 25, 2008 5:31 pm ] |
Post subject: | Re: Quick Lua Tips |
Negative X works for me. Just don't put a space after the negaitve. This works: Code: for actors in MovableMan.Actors do actors.Vel = Vector(-5,-10) Makes them hop left. Code: for actors in MovableMan.Actors do actors.Vel = Vector(5,-10) Makes them hop right. |
Page 1 of 3 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |