"+" and "-"
#1
"+" is not defined, currently (I believe). It can be used to add with ease, Instead of typing Vec2D:add or <variable>:add, they can use "+". It can also be used in math to make adding easier... AKA, save some time typing.
e.g.

[lua]while true do
eg = game.Environment
eg.Time = eg.Time + 1
wait(0.3)
end[/lua]


[lua]eg = game.World.TelePad2
function onTouched(hit)
if hit == "Body" then
hit.Position = eg.Position + 0.25
end[/lua]

Same thing for "-", will make subtraction easier.
All my mods are available here.
Reply


Messages In This Thread
"+" and "-" - by Nyht - 07-09-2011, 10:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)