Data Realms Fan Forums
http://45.55.195.193/

HECU
http://45.55.195.193/viewtopic.php?f=61&t=29720
Page 1 of 2

Author:  Whydoch [ Sat Jan 28, 2012 8:53 am ]
Post subject:  HECU

Greetings, gentlemen. I present to you:
The Hazardous Environment Combat Unit

These elite soldiers are sent in to mop up the paranormal, extradimensional, and the alien. They are equipped with the best gear the United States military had to offer at the end of the 20th century. They are working on securing air support for future operations in the field.

Image
The Fire Support Specialist. This soldier is armed with an M249 Squad Automatic Weapon

Image
The Squad Leader. This NCO is in charge of leading squads of riflemen into battle.

Image
The Rifleman. This trooper is equipped with an M4 carbine with an undermounted M203 grenade launcher.

Image
The Shock Trooper. This assault veteran comes equipped with an MP5 submachine gun and grenades.

Image
The Sniper. This merciless badass is a master marksman and comes armed with an M40A1 sniper rifle.

Image
The Pointman. This balaclava-clad soldier is trained to breach and clear with his SPAS-12 and grenades.

Image
The Engineer. Equipped with a welding torch, a detonator and an M9, this combat engineer can cut through or blow up anything. Watch out for his volatile fuel tank!

Image
The Medic. Strangely, this battlefield medic was only given a pistol, not a medical kit. Hmm.

Image
The Captain. The highest ranking officer that leads from the front, he commands a company of HECU soldiers. Brain unit.

Image


NEWLY ADDED: Sounds! Polish! A semi-useful engineer! SOUNDS!


Credits
A big thank you goes out to CaveCricket48 for the alternate-fire script, and to Kettenkrad for letting me use one of his old sprites. Thanks also to Gotcha! for his words of wisdom. Thank you to the creator of the metal slug mod whose tank code made the horrible abomination that is the Bradley possible. Credit for the spawning script to Bad Boy and Asklar.
Also since my ♥♥♥♥♥♥♥ forgot, credit to Valve for the original faction as well as the sounds and art design.
I love you Gabe
please don't sue me
TODO:

Black Ops
Air support

Attachments:
File comment: V. 1.0
HECU.rte.rar [1.22 MiB]
Downloaded 899 times
File comment: 1.1- No more Michael Jackson lean!
HECU.rte.rar [1.22 MiB]
Downloaded 537 times
File comment: 1.2- Bradley cannon working, cargo not
HECU.1.3.rte.rar [1.26 MiB]
Downloaded 513 times
File comment: Bradley can now spawn a squad of three rifleman every minute. Thanks to Bad Boy for the script! Press Z to try it out.
HECU.1.4.rte.rar [1.26 MiB]
Downloaded 520 times
File comment: Osprey added, kinda wonky at this point. Tends to overturn and go smashing into the ground. Just like the real thing!
HECU.1.5.rte.rar [2.34 MiB]
Downloaded 557 times
HECU.1.6.rte.rar [2.34 MiB]
Downloaded 690 times
File comment: SOUNDS! VOICES! WELDERS! FUEL TANKS! POLISH!
HECU.rte.1.7.rar [2.44 MiB]
Downloaded 4161 times

Author:  Dauss [ Sat Jan 28, 2012 10:03 am ]
Post subject:  Re: HECU

The vehicle sprite looks alright, but the offsets on the standard guys look a bit wonky. Do they walk like that in game?

Author:  wooden [ Sat Jan 28, 2012 2:12 pm ]
Post subject:  Re: HECU

Looks Very good
However Why are all the soldiers doing the Michael jackson lean ?

Author:  scrdest [ Sat Jan 28, 2012 5:58 pm ]
Post subject:  Re: HECU

GTFO OUT OF MY HEAD, GODDAMIT! I was thinking of the exact same thing yesterday (though I wouldn't be able to do it, heh). Now seriously, it looks good, I sure will be using them (especially in Zombie Cave, my fav vanilla mission). Good job!

Author:  Whydoch [ Sun Jan 29, 2012 6:18 pm ]
Post subject:  Re: HECU

Thanks!
Still a WIP, got a few things to do. I'm gonna try to fix the bradley and make the walkpaths less awkward. Also, Osprey VTOL for a drop ship y/n?

Author:  scrdest [ Sun Jan 29, 2012 7:44 pm ]
Post subject:  Re: HECU

Yes, yes, yes! Also, while we're at it, there are some weird things in crafts from this mod. One drops a Coalition soldier with HECU weapons, one drops an invisible 'drop crate' and third I didn't test. I guess they're used for Bradley (BTW, ask Gotcha! about his tank scripts, and try to make the spawning attack secondary).

Author:  Whydoch [ Mon Jan 30, 2012 1:47 am ]
Post subject:  Re: HECU

You're right, the invisible craft are what the bradley spawns behind it. In my next update (which might take a few days) I'll hide 'em and fix the bradley's autocannon. Once I figure out basic lua, I can make the dude spawner a secondary fire. Working on spriting the osprey and polishing the bradley, but the osprey won't be in for another update at least.

Author:  scrdest [ Mon Jan 30, 2012 5:25 pm ]
Post subject:  Re: HECU

Removing them is simple: use Buyable = 0 in the .ini. However, I think that you prolly could do away with them altogether by using lua, CreateAHuman or CreateActor = AHuman or something like that, check the wiki for documentation or ask one of our lua gods around here. Generally, secondary fire works by spawning a copy of the weapon with identical sprite but different attributes and adding a pie menu options for both modes. However, AFAIK this makes the weapon reloaded. So, it's probably easiest just to give him two weapons, a turret and a spawner.

Author:  Whydoch [ Mon Jan 30, 2012 7:11 pm ]
Post subject:  Re: HECU

Making the craft nonbuyable is easy, unfortunately because ACrabs can only have one weapon, I can't just give the bradley a spawner and a cannon. Maybe with a lua script the bradley could use the gun as its main weapon and create an aemitter by pressing z that spawns an ABomb? Worth looking into. Anyone who has thoughts on this, please, gimme a hand.

Author:  scrdest [ Mon Jan 30, 2012 8:42 pm ]
Post subject:  Re: HECU

Seems to be a good solution.

Author:  Benpasko [ Tue Jan 31, 2012 5:21 am ]
Post subject:  Re: HECU

Instead of adding hotkeys, wouldn't it be possible to give it an alternate fire mode like the vanilla grenade launcher? One would spawn troops, the other would fire the cannon.

Author:  Whydoch [ Tue Jan 31, 2012 6:03 am ]
Post subject:  Re: HECU

Tried it, no luck. I'm going to scrap the spawner in favor of actually being an APC, with a script along the lines of Apollocalipse's mechsuits without preventing control of the bradley when it's empty, in addition to being able to store 4-5 guys inside. It would (in theory) check crew size when an actor tries to get in, update crew size when he's inside, and eject the actors in the same order they entered in using.

Author:  Bad Boy [ Tue Jan 31, 2012 8:25 am ]
Post subject:  Re: HECU

I don't guarantee this'll work off the bat since I just threw it together in 5 minutes while on my way to bed (that means no testing) and I'm not very experienced with actor lua since I tend to stick with activities. But I don't see any errors after quickly looking through it so that's a good sign. If it is broken I'm sure someone (maybe me) will fix it up for you.
Note that you'll have to change things like troop name and yourmodule.rte to the relevant troop and .rte folder. Also note that anything followed by -- is a comment (I'm not sure how much lua you know) so it can stay or go without breaking the script. I should have commented more to explain things to you but I'm in a hurry, if you want I can do it tomorrow.
Code:
function Create(self)
   self.SpawnTimer = Timer();
   self.SpawnInterval = 5000; -- Change this time to whatever you want in between spawning, in miliseconds
   self.SpawnTimer:Reset();
end
function Update(self)
   if UInputMan:KeyPressed(26) and self:IsPlayerControlled() then
      if self.SpawnTimer:IsPastSimMS(self.SpawnInterval) then
         local Actors = {}
         for i = 1, 3 do
            Actors[i] = CreateAHuman("HECU Fire Support Specialist" , "HECU.rte");
            Actors[i].Team = self.Team;
            Actors[i].AIMode = Actor.AIMODE_SENTRY;
            if self.HFlipped == false then
               Actors[i].Pos = Vector(self.Pos.X - 85 - 25*i , self.Pos.Y);
            elseif self.HFlipped == true then
               Actors[i].Pos = Vector(self.Pos.X + 85 + 25*i , self.Pos.Y);
            end
            MovableMan:AddActor(Actors[i]);
         end
         self.SpawnTimer:Reset();
      end
   end
end


Edit: Guess that's what happens when you write something hurriedly at 3 am and don't test it. This version works. If you want to do what your script is attempting and make the vehicle act as an actual apc the first thing you need to do is check your script's ends, you're missing quite a few. Anyway, I can probably help you with that too if you'd like.
Also, whether you go with this or the other script I'd recommend using a pie slice instead of a specific key since it'll cause fewer problems (people may use z as one of their movement keys or something).

Author:  Asklar [ Tue Jan 31, 2012 8:14 pm ]
Post subject:  Re: HECU

You should add in the first if in the update function "if self:IsPlayerControlled()", because the only condition is pressing z, which means that if I have more tanks every tank will spawn actors or if I have selected another actor and press z it will still spawn the units even without it being selected.

Author:  Bad Boy [ Tue Jan 31, 2012 8:18 pm ]
Post subject:  Re: HECU

Derp thank you, man I did a poor job on this one. Luckily I managed to edit out that previous mess before anyone replied (and hopefully saw) :D

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