Using map triggers is easier in this case, just put a delayer, trigger_use and a hurt entity. You must just figure it out and you can make those perfect chargers without dropping any items (health packs, armor). The HEV-suit charger would be best to do with Lua though, some way... I'm not so sure how, long time ago since I've used Lua scripts. But I know it's possible.
Forum
CS2D Mods Half-Life 2DUsing map triggers is easier in this case, just put a delayer, trigger_use and a hurt entity. You must just figure it out and you can make those perfect chargers without dropping any items (health packs, armor). The HEV-suit charger would be best to do with Lua though, some way... I'm not so sure how, long time ago since I've used Lua scripts. But I know it's possible.
We haw too make adventure on lua !
Also the main player Gorden has to be in his lab coat with his arms at his side until he gets his HEV suit. Even then his arms must be at his side until he then gets the crowbar.
Basically their must be a min of 3 lua for this as well as 2 player sprites of Gorden in his lab coat & him in his HEV unarmed.
HaRes drop knife lua is a good place to start for making Gorden unarmed until he picks up the crowbar.
Their is also the lua required to create the HEVs armor properties & its ability to recharge at HEV charging stations & the small battery packs for it.
The actuall HEV pick up as well as the batteries are best to be made a separate lua items.
The modified drop knife lua must also be made so that when the player drops the crowbar AKA knife replacement that a drop model spawns on the floor & can be picked up again like with regular weapons.
The main thing we need is - When he puts on his HEV the music and the sounds have to be in order like in the original...
If my regular mapping with sprites and sounds give away about 200 files... then this mod will have about 1000 files
As I said the best option for the HEV would be to make it a separate lua item for the anomalous materials map. The Gordon player model (CT1 atm) will have his HEV suit by default.
Its only in the anomalous materials map & the tram ride intro map that gorgon is without his HEV suit so thus a simple map lua & 2 sprites for the player is all that's needed for thos beginning maps.
The 2 sprite required for Gordon in these maps will be as follows.
Unarmed Gordon in lab coat
Unarmed Gordon in HEV
When the player picks up the Crowbar in the unforeseen consequences map the Unarmed HEV sprite will disappear the Gordon player will revert to the default CT1 Gordon in HEV suit. The Unarmed HEV sprite will only return when the player CT1 drops the knife (crowbar) which can be picked up again.
I have the HEV version almost done. Somewhere around march ill release a big skin pack for the HL2D page on Mod DB to show what I have been working on.
Perhaps the HEV-charger could work something like this...
If player is on tile [52,67] and uses the button on the tile he will get armor 25+ if my Lua script is correct which I'm doubtful of. Anyways, combind this with a trigger_delay(or not?) on that button so that it can only be used limited times, perhaps 8 times, that's 200 armor if you got 0 armor. It's also good to have a check if you already have 200 armor then the HEV charger won't give you. Otherwise it will get buggy, and go back to 0 again or such. Had problems with that before. I hope someone figures this out with the HEV chargers creating the perfect one in complete Lua and map triggers.
edited 1×, last 03.01.11 07:49:04 pm
1
2
3
4
2
3
4
setarmor <id> <armor type> Armor Type: 0 - 200 ~ Normal Armors 201 - 206 ~ Special Armors
Edit: NTD, this mod will have any -sven coop mode?. That would be funny
edited 1×, last 03.01.11 07:36:41 pm
The HEV charger also depending on the difficulty level had a max charge of 25 (hard) 50 (normal) & 75 (easy).
The chargers also only replenished the HEV value by 1 every half sec or so for as long as the player used it or until it ran out.
NOTE Health chargers also worked the exact same way.
It was only in HL2 that the HEV had a armor value of 200 & that was only in the citadel levels. The HL2 HEV also used Combine power sources which is why it could be overcharged to 200.
On contrast the HL1 mark 4 HEV suit came before the HL2 mark 5 HEV so thus the old mark 4 was limited to human power sources & thus only had a value of 100 max.
Also on another note would it be possible to make the rocket launcher a grenade launcher for say the AK47 (M4A2 M203) & the P90 (MP5 M203)?
Basically I want to make a M203 grenade launcher lua script for 2 weapons the M4 & MP5. I was thinking of making a nade launcher that behaves just like the one in Half Life.
Details on how I want to make the launchers to function as.
1) The launcher is a secondary fire mode for the MP5 (P90) & M4 (AK47).
2) The secondary launcher is activated with the right mouse button or F3 as the default bind key.
3) Both the launcher for the MP5 & M4 are single shot with a 3 sec delay between shots (during this delay you may also not use the primary fire mode)
4) Both launchers use the same ammo reserve with a max ammo count of 10+1
5) During the 3 sec delay there will be a custom reload sound for the launcher.
6) The grenade launcher (rocket launcher) will have its own reloading sound & projectile flight/fire sound. (since the default rocket launcher uses the RPGs firing/rocket flight sound)
So from a lua perspective what would be my main obstacles for making a lua for such a function ?
one thing you could do is just giving the player the knive so he cant shoot but then you had to fake the weapon image.
everything else is pretty easy
Just to further clarify things
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Half Life 2D Controls bind "0" "slot10" bind "1" "slot1" bind "2" "slot2" bind "3" "slot3" bind "4" "slot4" bind "5" "slot5" bind "6" "slot6" bind "7" "slot7" bind "8" "slot8" bind "9" "slot9" bind "conkey" "console" bind "W" "forward" bind "S" "back" bind "A" "left" bind "D" "right" bind "leftshift" "speed" bind "mouse1" "attack" bind "mouse2" "attack2" bind "R" "reload" bind "mwheelup" "invprev" bind "mwheeldown" "invnext" bind "Q" "lastinv" bind "E" "use" bind "F5" "snapshot"