Author |
Message |
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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
|
Sun Aug 24, 2008 5:33 am |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
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.
|
Sun Aug 24, 2008 5:33 am |
|
|
FarvanTorna
Joined: Sat Dec 02, 2006 11:51 pm Posts: 204
|
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.
|
Sun Aug 24, 2008 5:44 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: Quick Console Commands
why do some of the commands have "end end" instead of just "end"?
|
Sun Aug 24, 2008 6:01 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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.
|
Sun Aug 24, 2008 6:06 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: Quick Console Commands
Dont get it...
Last edited by whitty on Sun Aug 24, 2008 6:39 am, edited 1 time in total.
|
Sun Aug 24, 2008 6:13 am |
|
|
Ophanim
Joined: Wed Dec 26, 2007 6:33 am Posts: 1743 Location: Trapped in UCP. Send help.
|
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.
|
Sun Aug 24, 2008 6:20 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: Quick Console Commands
OH now I get it... Thanks! 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?
|
Sun Aug 24, 2008 6:39 am |
|
|
robowurmz
Joined: Thu Aug 16, 2007 10:09 am Posts: 163
|
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!
|
Sun Aug 24, 2008 8:20 am |
|
|
war_man333
Joined: Sun Nov 11, 2007 1:49 pm Posts: 785
|
Re: Quick Console Commands
This thread delivers! Woo! How the hell did you guys figure out those comands?
|
Sun Aug 24, 2008 9:01 am |
|
|
Roon3
Joined: Sun May 11, 2008 12:50 pm Posts: 899
|
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?
|
Sun Aug 24, 2008 9:41 am |
|
|
robowurmz
Joined: Thu Aug 16, 2007 10:09 am Posts: 163
|
Re: Quick Console Commands
Yeah. You can't change material on the fly.
|
Sun Aug 24, 2008 9:50 am |
|
|
Seraph
Moderator Hero
Joined: Sun Dec 24, 2006 11:28 pm Posts: 868 Location: London Server
|
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!
|
Sun Aug 24, 2008 10:47 am |
|
|
findude
Joined: Tue Dec 12, 2006 3:10 pm Posts: 495 Location: Uncertain quantum state
|
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!
|
Sun Aug 24, 2008 11:02 am |
|
|
Daman
Joined: Fri Jan 26, 2007 3:22 am Posts: 1451
|
Re: Quick Console Commands
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.
|
Sun Aug 24, 2008 3:53 pm |
|
|
|