View unanswered posts | View active topics It is currently Sat Dec 28, 2024 4:45 pm



Reply to topic  [ 140 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 10  Next
 Quick Console Commands 
Author Message
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Dec 02, 2006 11:51 pm
Posts: 204
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: Quick Console Commands
why do some of the commands have "end end" instead of just "end"?


Sun Aug 24, 2008 6:01 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Dec 26, 2007 6:33 am
Posts: 1743
Location: Trapped in UCP. Send help.
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post 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?


Sun Aug 24, 2008 6:39 am
Profile

Joined: Thu Aug 16, 2007 10:09 am
Posts: 163
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Nov 11, 2007 1:49 pm
Posts: 785
Reply with quote
Post Re: Quick Console Commands
This thread delivers! Woo!
How the hell did you guys figure out those comands? :shock:


Sun Aug 24, 2008 9:01 am
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post 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
Profile WWW

Joined: Thu Aug 16, 2007 10:09 am
Posts: 163
Reply with quote
Post Re: Quick Console Commands
Yeah. You can't change material on the fly.


Sun Aug 24, 2008 9:50 am
Profile
Moderator Hero

Joined: Sun Dec 24, 2006 11:28 pm
Posts: 868
Location: London Server
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post 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
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post 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.


Sun Aug 24, 2008 3:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 140 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 10  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.050s | 14 Queries | GZIP : Off ]