View unanswered posts | View active topics It is currently Fri Mar 29, 2024 2:24 pm



Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next
 Assault on Fort Malgar 
Author Message

Joined: Mon Aug 25, 2008 1:03 am
Posts: 10
Reply with quote
Post Assault on Fort Malgar
Hey folks. Sorry if this is the wrong section for this, but hopefully fellow lua scripters can benefit from it.
I've been following Cortex Command for a while, and I'm really excited by the new release. So I made a custom campaign level.

It's an assault map. You have five lives and must attempt a daring one-man attack on a heavily-guarded fort. Destroy their brain to secure victory for the Coalition!

Of note to scripters:
* Player is deployed by drop pod
* Auto-switch to active character
* Life counter
* Enemy reinforcements trigger
* Victory/Defeat conditions
* Random weapon selection

If anyone figures out how to set the player's funds, lemme know. For now, don't buy anything. :-( EDIT: Solved!

Feel free to use any portion of this script in your own projects.

Have fun playing, and happy modding!


Last edited by Tayrtahn on Mon Aug 25, 2008 3:40 am, edited 2 times in total.



Mon Aug 25, 2008 1:39 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Assault on Fort Malgar
ActivityMan:GetActivity():SetTeamFunds(2500,0)

Might be of interest to you.

2500 is the money, 0 is the team.


Mon Aug 25, 2008 1:48 am
Profile
User avatar

Joined: Sun May 06, 2007 6:38 pm
Posts: 4
Reply with quote
Post Re: Assault on Fort Malgar
Only problem I had was when I accidentally switched to the brain when my guy was dropped off, he shot at the rocket and got himself killed. Other then that it was awesome.


Mon Aug 25, 2008 1:55 am
Profile WWW

Joined: Mon Aug 25, 2008 1:03 am
Posts: 10
Reply with quote
Post Re: Assault on Fort Malgar
Grif wrote:
ActivityMan:GetActivity():SetTeamFunds(2500,0)

Might be of interest to you.

2500 is the money, 0 is the team.

Awesome! New version uploaded.

gamerman wrote:
Only problem I had was when I accidentally switched to the brain when my guy was dropped off, he shot at the rocket and got himself killed. Other then that it was awesome.

Yeah, the rocket is set to neutral so the player can't take control of it and blow themself up. The downside is that the AI considers it hostile.
The rocket also has a tendency to fail horribly at landing sometimes, but that seems to be a general feature of the rocket. :)


Mon Aug 25, 2008 2:08 am
Profile

Joined: Mon Dec 04, 2006 3:34 am
Posts: 2378
Reply with quote
Post Re: Assault on Fort Malgar
I would move this to Scenes, but it appears you are meaning it somewhat as a resource for other people to learn some lua from. So here is fine.

THis post is just to alert people that lua-driven scenes are still scenes, and go over there, this section is for discussion and whathaveyou.


Mon Aug 25, 2008 3:29 am
Profile
User avatar

Joined: Wed Nov 21, 2007 7:49 pm
Posts: 189
Reply with quote
Post Re: Assault on Fort Malgar
The AI refuses to defend themselves against me.

Scratch that, they do after the first few seconds. :???:


Last edited by NickFury666 on Mon Aug 25, 2008 4:17 am, edited 1 time in total.



Mon Aug 25, 2008 4:11 am
Profile

Joined: Sun Apr 13, 2008 5:24 pm
Posts: 49
Reply with quote
Post Re: Assault on Fort Malgar
This is really cool, and sets a good example for people trying to figure out how to script. The only problem here is that sometimes the enemy actors just sit there without attacking while you're right in front of them.


Mon Aug 25, 2008 4:15 am
Profile
User avatar

Joined: Sat Jan 27, 2007 9:38 am
Posts: 170
Location: St. Louis, MO
Reply with quote
Post Re: Assault on Fort Malgar
Looks like we won't have very vicious defenders until we get an AI upgrade. At the moment they're using sentry mode, which is essentially "Stand still and shoot stuff when you see it." It works well when your enemies are just as stupid, i.e. Brain Hunt which is "Move toward the brain and shoot stuff when you see it," but it doesn't fare well against a player.

That being said, this is awesome. You included diggers in the weapons table though. It looks normal until you see them running around point their diggers at you. Also, shotgun; most accurate weapon in the game? It's more likely than you think.


Mon Aug 25, 2008 4:58 am
Profile WWW
User avatar

Joined: Wed Apr 30, 2008 10:10 am
Posts: 214
Location: Seattle, WA
Reply with quote
Post Re: Assault on Fort Malgar
this works very very well, especially for the first released user-made mission. I quite enjoy it. Even playing through it with mods loaded is fun and challenging.


Mon Aug 25, 2008 5:30 am
Profile WWW
Reply with quote
Post Re: Assault on Fort Malgar
This is great.
If you want to absolutely restrict the users ability to buy stuff I suggest making the funds -9000 or something because you can still dig.
EDIT: I was wondering, what is the concrete sprayer for?


Mon Aug 25, 2008 2:15 pm
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Assault on Fort Malgar
For actor burying of course.
Now I'm a Lua newb, but is it possible to grab the entire list of weapons available in the buy menu for use in the random select for enemies? For some mods it wouldn't work too well (DSTech), but for DarkStorm and Kloveska it would add some nice variety.


Mon Aug 25, 2008 4:23 pm
Profile

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: Assault on Fort Malgar
Tea wrote:
EDIT: I was wondering, what is the concrete sprayer for?


Its for closing the reinforcement path to the enemy landing pad and for barricades that will protect you when you engage the third dreadnought in the lowest level.

Good layout, I love this map and I got through only on the second try since I kept screwing up and the dreadnoughts were overkill in those closed modules.


Also giant thanks for some nice scripting examples, I see its possible to create a deathmatch mode and quite alot of other things out of this really easy.


Mon Aug 25, 2008 4:28 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Assault on Fort Malgar
I just thought of something. Gotcha!'s Mario map can finally be completed. With Doombas and happy highscore at the end.


Mon Aug 25, 2008 8:30 pm
Profile
User avatar

Joined: Sat Aug 23, 2008 3:48 pm
Posts: 48
Reply with quote
Post Re: Assault on Fort Malgar
Very fun map, played through it twice, please make more, also, the first two enemys you can see. Above the door and in the window don't appear to attack or "scan" like the others do.


Mon Aug 25, 2008 8:40 pm
Profile
User avatar

Joined: Sun Apr 15, 2007 5:56 am
Posts: 1191
Location: outside the shithole called the University in the Forest
Reply with quote
Post Re: Assault on Fort Malgar
For some reason, it doesn't work. No scripts activate.


Tue Aug 26, 2008 1:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 43 posts ]  Go to page 1, 2, 3  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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.071s | 15 Queries | GZIP : Off ]