Data Realms Fan Forums
http://forums.datarealms.com/

Quick Console Commands
http://forums.datarealms.com/viewtopic.php?f=73&t=12051
Page 2 of 10

Author:  Grif [ Sun Aug 24, 2008 5:33 am ]
Post subject:  Re: Quick Console Commands

You can load Lua files with the console, or with a custom map.

I use Notepad++ to edit Lua; it's got built in nesting, syntax highlighting and a variety of other useful features.

Contribution to the topic (requires an area the size of the map, and can't be used directly through the console)

Code:
    for actor in MovableMan.Actors do
        if SceneMan.Scene:WithinArea("Railgun", actor.Pos) then
         actor.Vel.X = actor.Pos.X / -10;
        end
    end

Author:  Lord Tim [ Sun Aug 24, 2008 5:33 am ]
Post subject:  Re: Quick Console Commands

FarvanTorna wrote:
CherryT wrote:
How would you make the current console better?
I mean, there's always autocomplete, but a console's a console. It's only real job is to allow you to send commands to the program, have the program interpret it, and display/do the result.



what would be better for me

is able to make lua on notepad then upload them into the game.
or a lua edtior just for cortex command that sits on the side and allows you to produce on the side and upload to game and possible with syntax checker and possible small bit of sample code.


loadfile ([filename]) is a Lua function. Also, Notepad++ is very nice.


The Console could definitely use some improvement. Scrollbar, faster cursor movement, readable text, pageup/pagedown, and something so that we can insert ~ ` / ? characters without the thing closing.

Author:  FarvanTorna [ Sun Aug 24, 2008 5:44 am ]
Post subject:  Re: Quick Console Commands

question
Can you make a constantly checking Lua script.
where it will continue to run
not just a load
but an on frame.

Author:  whitty [ Sun Aug 24, 2008 6:01 am ]
Post subject:  Re: Quick Console Commands

why do some of the commands have "end end" instead of just "end"?

Author:  Grif [ Sun Aug 24, 2008 6:06 am ]
Post subject:  Re: Quick Console Commands

Scripts connected to "zones" update constantly, and I'm assuming that anything connected to a for/while loop in a script would run constantly.

Author:  whitty [ Sun Aug 24, 2008 6:13 am ]
Post subject:  Re: Quick Console Commands

Dont get it...

Author:  Ophanim [ Sun Aug 24, 2008 6:20 am ]
Post subject:  Re: Quick Console Commands

whitty wrote:
why do some of the commands have "end end" instead of just "end"?

Code:
    for actor in MovableMan.Actors do
        if SceneMan.Scene:WithinArea("Railgun", actor.Pos) then
         actor.Vel.X = actor.Pos.X / -10;
        end
    end

If needs an end on it and for needs an end on it. Think of them as separate, interlinked scripts.

Author:  whitty [ Sun Aug 24, 2008 6:39 am ]
Post subject:  Re: Quick Console Commands

OH now I get it... Thanks! :D

1 last question... Is it possible to add an AEmitter to all of your actors through the script right now? If so, what's the code?

Author:  robowurmz [ Sun Aug 24, 2008 8:20 am ]
Post subject:  Re: Quick Console Commands

Need some health for your guys?
Code:
for actor in MovableMan.Actors do if actor.Team == 0 then actor.Health = actor.Health * 20 end end


BONUS! x20 HEALTHS! YOU ARE A WINRAR!

Code:
for actor in MovableMan.Actors do if actor.Team == 0 then while ( actor.Health < 30 ) do actor.Health = actor.Health + 20 end end end

HELTH NEVAR DROP UNDER THIRTY YAY!

Author:  war_man333 [ Sun Aug 24, 2008 9:01 am ]
Post subject:  Re: Quick Console Commands

This thread delivers! Woo!
How the hell did you guys figure out those comands? :shock:

Author:  Roon3 [ Sun Aug 24, 2008 9:41 am ]
Post subject:  Re: Quick Console Commands

Code:
for actor in MovableMan.Actors do if actor.Team == 0 then actor.Material = Test end end


I Tried that and it gives me this:

Code:
Actor.Material is read only


I have never came across this, does it mean you can't change material?

Author:  robowurmz [ Sun Aug 24, 2008 9:50 am ]
Post subject:  Re: Quick Console Commands

Yeah. You can't change material on the fly.

Author:  Seraph [ Sun Aug 24, 2008 10:47 am ]
Post subject:  Re: Quick Console Commands

Lord Tim wrote:
Guess what this thread is for!

Guess what this command does!

Code:
for i=1,50 do local crab = CreateACrab("Crab"); crab.Pos = Vector(SceneMan.Scene.Width * PosRand(),SceneMan.Scene.Height * PosRand()); MovableMan:AddActor(crab); end


P.S. You can copy and paste code into the console.


What have you DONE?! You'll kill us all!

Author:  findude [ Sun Aug 24, 2008 11:02 am ]
Post subject:  Re: Quick Console Commands

Stupid ReadOnly...
Blows up 30 frag shells at controlled actor.
Code:
P = nil for i=0,30 do P = ActivityMan:GetActivity():GetControlledActor(0) i = CreateTDExplosive("Frag Shell") i.Pos =  P.Pos i.Vel = Vector(0,0) i.PinStrength = 2000 MovableMan:AddMO(i) i:GibThis() end;


Blows up 3 grenades at every actor.
Code:
for P in MovableMan.Actors do for i=0,3 do i = CreateTDExplosive("Frag Grenade") i.Pos =  P.Pos i.Vel = Vector(0,0) i.PinStrength = 2000 MovableMan:AddMO(i) i:GibThis() end; end;


More to come!

Author:  Daman [ Sun Aug 24, 2008 3:53 pm ]
Post subject:  Re: Quick Console Commands

Image


for i=1,200 do junk = CreateMOSRotating("Drop Ship Hull Gib E"); junk.Pos = Vector(SceneMan.Scene.Width * PosRand(), SceneMan.Scene.Height * PosRand()); MovableMan:AddParticle(junk); end


You can change the E after gib to any letter before it and a couple after for different gibs.

Page 2 of 10 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/