Author |
Message |
coilgunner4
Joined: Tue Aug 26, 2008 11:38 pm Posts: 26 Location: Kansas (contrary to popular belief Kansas does in fact have computers)
|
Re: Quick Console Commands
Robber wrote: I just made a java program to generate some quick console commands. It's still WIP. Please tell me if I should add something to it and if there are bugs. Screenshot: Dude Nice! I can see this being really useful if you add a little more. Heck It already is extremely useful and awesome!
|
Mon Sep 15, 2008 4:44 am |
|
|
AtomicTroop
Joined: Fri Mar 16, 2007 1:28 pm Posts: 328 Location: Finland
|
Re: Quick Console Commands
Hmm, you should add some more effects like changing health, etc. Also a global variable changing area would be nice. (Gold, kills, etc.)
|
Mon Sep 15, 2008 7:43 am |
|
|
macattack
Joined: Wed Jul 09, 2008 1:34 am Posts: 218 Location: Monkey Island: It is teh fluffy here.
|
Re: Quick Console Commands
Any more commands? They were just getting cool.
|
Fri Oct 10, 2008 2:02 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Quick Console Commands
Currently, I'm trying to figure out the prototype for AttachEmitter. I'm not really sure which object it belongs to either. I know it exists, though. Any ideas?
|
Thu Nov 13, 2008 6:16 am |
|
|
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
Re: Quick Console Commands
I'm trying to set Pos.X to my brain's position but I can't figure out how to do it. Is this possible?
|
Wed Dec 10, 2008 12:35 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Quick Console Commands
Do this to get the brain: Code: for actor in MovableMan.Actors do if actor.PresetName == "Brain Case" and actor.Team == 0 then brain = actor; end end Then, assuming you have the actor you want to move stored as "player": Code: player.Pos.X = brain.Pos.X;
|
Wed Dec 10, 2008 12:57 am |
|
|
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
Re: Quick Console Commands
Thank you!
|
Wed Dec 10, 2008 1:48 am |
|
|
Ultric
Joined: Thu Jul 10, 2008 6:23 pm Posts: 301 Location: Lurking somewhere around here...
|
Re: Quick Console Commands
Can you pin a dropship (abductor) in Lua?
|
Fri Dec 12, 2008 3:30 am |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
Re: Quick Console Commands
I know for a fact that you can set LifeTime with Lua, so you can probably set PinStrength or AirResistance.
|
Fri Dec 12, 2008 3:49 am |
|
|
Ultric
Joined: Thu Jul 10, 2008 6:23 pm Posts: 301 Location: Lurking somewhere around here...
|
Re: Quick Console Commands
How do you fix that? I'm pretty new to Lua syntax.
|
Fri Dec 12, 2008 5:17 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Quick Console Commands
PinStrength can be set simply with PinStremgth, I use it all the time. First of all, store the actor you want as a variable. Assuming the variable is ship: Code: ship.PinStrength = 100000; That'll pretty much keep it there. Not sure about AirResistance though, but assuming that it is changeable, just do it in the same way.
|
Fri Dec 12, 2008 8:19 pm |
|
|
Brainwashed
Joined: Fri May 16, 2008 11:12 pm Posts: 471
|
Re: Quick Console Commands
I compiled all the stuff that has been said up to now: Code: Cortex Command Lua Strings :
-Send all actors of a set team in a set direction: for victim in MovableMan.Actors do if victim.Team==0 then if victim.ClassName == "AHuman" or victim.ClassName == "ACrab" or victim.ClassName == "ACDropShip" or victim.ClassName == "ACRocket" then victim.Vel=Vector(0,0) end end end
(You can change the team from 0 to 1 if you want Green Actors to be affected by this rather than red actors. You may also remove one or more of the above victims to isolate the effect to a specific type of actor. Change the variables in parenthesis after ‘Vector’ to make the affected actors fly in a set direction.)
-Send all actors in a set direction: for victim in MovableMan.Actors do if victim.ClassName == "AHuman" or victim.ClassName == "ACrab" or victim.ClassName == "ACDropShip" or victim.ClassName == "ACRocket" then victim.Vel=Vector(0,0) end end
(Again, you can remove one or more of the above victims to isolate the effect to a specific type of actor.)
or
-Send all actors in a set direction: for actor in MovableMan.Actors do actor.Vel = Vector(0, 0) end
-Send all actors in a set direction: for crabs in MovableMan.Actors do if crabs.ClassName == "ACrab" then crabs.Vel = Vector(0,-500); end end
(Change the type of actor and the actor preset name to another value to move different victims. You may also change the values in parenthesis after ‘Vector’ to change the direction the victims will be sent in)
-Spawn actors all over the map: for i=1,50 do local crab = CreateACrab("Crab"); crab.Pos = Vector(SceneMan.Scene.Width * PosRand(),SceneMan.Scene.Height * PosRand()); MovableMan:AddActor(crab); end
(In the above example, crabs will be spawned. Change the type of actor (after ‘Create’) and the preset name of the actor in (“”) to get any actor you want. Be sure to also change the actor in parenthesis after ‘AddActor’)
-Gib all of a team’s actors:
for victim in MovableMan.Actors do if victim.Team==0 then if victim.ClassName == "AHuman" or victim.ClassName == "ACrab" or victim.ClassName == "ACDropShip" or victim.ClassName == "ACRocket" then victim:GibThis() end end end
(You can change the team from 0 to 1 if you want Green Actors to be affected by this rather than red actors. You may also remove one or more of the above victims to isolate the effect to a specific type of actor.)
-Gib all actors: for actor in MovableMan.Actors do actor:GibThis() end
-Gib all actors of a set type and name: for crabs in MovableMan.Actors do if crabs.ClassName == "ACrab" then crabs:GibThis(); end end
(Change the type of actor and the actor preset name to another value to gib different victims)
-Change all actors’ team: for actor in MovableMan.Actors do actor.Team = 0 end
(You may also change the 0 to a 1 if you want every actor to become part of the Green team, and -1 to make them independent.)
-Rejuvenate all units of a set type and preset name: for crabs in MovableMan.Actors do if crabs.ClassName == "ACrab" then print("Crab health: " .. crabs.Health); crabs.Health = crabs.Health + (100 - crabs.Health); end end
(Change the actor type and preset name to affect different actors. You may also change the health from 100 to another value if you wish to.)
-Create a dropship with a set actor in it: local ship = CreateACDropShip("Drop Ship MK1"); local load = CreateACrab("Crab"); ship:AddInventoryItem(load); ship.Pos = Vector(SceneMan.Scene.Width * PosRand(),0); ship.Vel = Vector(0, 400); MovableMan:AddActor(ship);
(You may add more actors and change the actor type and preset name.)
-Go back to editing mode: ActivityMan:GetActivity().ActivityState = Activity.EDITING
(Also resets the timer.)
-All actors get crushed by a set actor: for actor in MovableMan.Actors do misl = CreateACRocket("Rocket MK1"); misl.Pos = Vector(actor.Pos.X, actor.Pos.Y - 500); misl.Vel = Vector(0,500); print(misl.Pos); MovableMan:AddActor(misl); end
(You may change the actor type and preset name to get a different actor to spawn.)
-Blow up 30 frag shells at controlled actor: 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;
-Blow up three grenades at every actor: 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;
-Make junk appear everywhere on the map: 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 also change the ‘E’ to A, B, C, D, F or G)
-Save all current lua strings: ConsoleMan:SaveInputLog("myconsoleinput.txt")
-Save all current lua strings to a file: ConsoleMan:SaveAllText("myconsoletext.txt")
-Change size of console: ConsoleMan.ScreenSize = 0.5
-Hyperspeed for controlled actor: SceneMan:AddSceneObject(ToSceneObject(ActivityMan:GetActivity():GetControlledActor(0)))
|
Sat Dec 13, 2008 5:57 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Quick Console Commands
Turn your selected uber-unit into your brain! Code: ActivityMan:GetActivity():SetPlayerBrain(ActivityMan:GetActivity():GetControlledActor(0),0)
|
Mon Dec 22, 2008 4:36 am |
|
|
CandleJack
Joined: Sun May 18, 2008 8:30 am Posts: 732
|
Re: Quick Console Commands
Is there a console command that freezes the coordinates of all MOs?
|
Sat Dec 27, 2008 6:51 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Quick Console Commands
Code: for actor in MovableMan.Actors do actor.PinStrength = 100000 end end
|
Sat Dec 27, 2008 6:57 am |
|
|
|
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
|
|