A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »loadout system

Author Topic: loadout system (15 messages, Page 1 of 1)
Moderators: Dennis

kinpat
Joined: Apr 22, 2014

:D


Posted: Jun 27, 2014 09:59 AM    Msg. 1 of 15       
ok so I'm trying to do a working loadout system (nothing fancy descent style but a simpler one) but I have this one problem left: lets say I have a AR as primary W and SR as secondary W. Then I click this button that will give me a new player profile with new weapons. The problem is that the previous classes primary weapon will stay as my third weapon, alongside the new weapons... how can I prevent this from happening? (giving an empty loadout before the new one doesn't seem to work ether..)

So in the end, the thing what I'm looking for is to make player lose ALL weapons by using a script, not just the secondary weapon.
Edited by kinpat on Jun 27, 2014 at 05:40 PM


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Jun 28, 2014 07:33 AM    Msg. 2 of 15       
Quote: --- Original message by: kinpat

ok so I'm trying to do a working loadout system (nothing fancy descent style but a simpler one) but I have this one problem left: lets say I have a AR as primary W and SR as secondary W. Then I click this button that will give me a new player profile with new weapons. The problem is that the previous classes primary weapon will stay as my third weapon, alongside the new weapons... how can I prevent this from happening? (giving an empty loadout before the new one doesn't seem to work ether..)

So in the end, the thing what I'm looking for is to make player lose ALL weapons by using a script, not just the secondary weapon.
Edited by kinpat on Jun 27, 2014 at 05:40 PM


I know what you mean, but have no idea how to fix it.

I just bumped in the hope you could plead your case further, in order to hook a helpful heart.


kinpat
Joined: Apr 22, 2014

:D


Posted: Jun 28, 2014 09:17 AM    Msg. 3 of 15       
thx for the bump
Well I sort of fixed it, but not the way I originally wanted but at least it works now;
Again, lets say I have an AR and an SR. when I click the button, it will give me a new starting profile, that's weapons are SMG and a shotgun. next I'll give the player an empty loadout that will remove all other weapons except the primary one, in this case, smg. next I will create 2 weapons, smg and shotgun that I will attach to the player and instantly detach from the player and shortly delete the weapon if it still exists. The reason I create BOTH weapons again is that if some loadouts have same weapons, and I might have the secondary W equipped, it might cause the player not having both weapons from the new loadout. But still if anyone knows an easier method to this, and would like to share his/hers knowledge, I would greatly appreciate it.


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Jun 28, 2014 10:42 AM    Msg. 4 of 15       
Okay, I am going to hazzard a guess that this involves scripting.

Why not look at the HSC file located within the ff decent download?

I am sure that would, help.

BTW, if you ever get round to fixing this as much as you can, could you make a tut?

Or if your shy, I'll make the tut under your directions. You'll receive credit of course.

It just seems like a tool the halomapping community could use right now.


Heatguts
Joined: Jun 6, 2014

Recon Armor FTW!


Posted: Jun 28, 2014 11:28 AM    Msg. 5 of 15       
I've wanted to look into a loadout system too.

When I get around to it I'll try to figure it out and hand out instructions.

Right now it'll probably be 5 starting profiles. You spawn and pick a profile, then the game overrides any equipment you spawned with and gives you the loadout. Pretty simple.

I think I'll have to have loadouts selectable from the pause menu though. That's the one downside because I can't do the multiple lives, onscreen buttons, and delayed respawning in firefight descent.


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Jun 28, 2014 11:53 AM    Msg. 6 of 15       
Quote: --- Original message by: Heatguts
I've wanted to look into a loadout system too.

When I get around to it I'll try to figure it out and hand out instructions.

Right now it'll probably be 5 starting profiles. You spawn and pick a profile, then the game overrides any equipment you spawned with and gives you the loadout. Pretty simple.

I think I'll have to have loadouts selectable from the pause menu though. That's the one downside because I can't do the multiple lives, onscreen buttons, and delayed respawning in firefight descent.


It sounds great, if you can teach me I'll make a tut to rival the likes of justin bieber.


Heatguts
Joined: Jun 6, 2014

Recon Armor FTW!


Posted: Jun 28, 2014 12:24 PM    Msg. 7 of 15       
Rival bieber? Not that hard.

Unless you are talking about popularity instead of quality.


Masters1337
Joined: Mar 5, 2006

halonaminator's unfortunate idol


Posted: Jun 28, 2014 12:54 PM    Msg. 8 of 15       
For SPV3 missions with loadouts we just start the player off with no weapons, and then give them a player profile. There is no way to get rid of the weapons in the players inventory without some convoluted scripting methods.


kinpat
Joined: Apr 22, 2014

:D


Posted: Jun 28, 2014 01:25 PM    Msg. 9 of 15       
Quote: --- Original message by: Masters1337
For SPV3 missions with loadouts we just start the player off with no weapons, and then give them a player profile. There is no way to get rid of the weapons in the players inventory without some convoluted scripting methods.

yeah, that's what thought... well I'm gona then stick with this one, 'cause it workes the way I need it to work (in a firefightmap where you spawn multiple times)
Edited by kinpat on Jun 28, 2014 at 01:25 PM


Heatguts
Joined: Jun 6, 2014

Recon Armor FTW!


Posted: Jun 28, 2014 01:34 PM    Msg. 10 of 15       
Quote: --- Original message by: Masters1337
For SPV3 missions with loadouts we just start the player off with no weapons, and then give them a player profile. There is no way to get rid of the weapons in the players inventory without some convoluted scripting methods.


According to hs_doc:

(player_add_equipment <unit> <starting_profile> <boolean>)
adds/resets the player's health, shield, and inventory (weapons and grenades) to the named profile. resets if third parameter is true, adds if false.

It wouldn't really matter if they have weapons or not according to this, right? It would just override the weapon.


Masters1337
Joined: Mar 5, 2006

halonaminator's unfortunate idol


Posted: Jun 28, 2014 01:41 PM    Msg. 11 of 15       
pretty sure it doesnt work... although if it does we've certainly been overlooking a lot of possibilities.


kinpat
Joined: Apr 22, 2014

:D


Posted: Jun 28, 2014 01:45 PM    Msg. 12 of 15       
Quote: --- Original message by: Heatguts
Quote: --- Original message by: Masters1337
For SPV3 missions with loadouts we just start the player off with no weapons, and then give them a player profile. There is no way to get rid of the weapons in the players inventory without some convoluted scripting methods.


According to hs_doc:

(player_add_equipment <unit> <starting_profile> <boolean>)
adds/resets the player's health, shield, and inventory (weapons and grenades) to the named profile. resets if third parameter is true, adds if false.

It wouldn't really matter if they have weapons or not according to this, right? It would just override the weapon.


wont work; that script will eliminate everything except the weapon you are holding. For example if you have 2 weapons and you get a new starting profile, the weapon you were holding will be as your third weapon, alongside the new weapons.
Edited by kinpat on Jun 28, 2014 at 01:47 PM
Edited by kinpat on Jun 28, 2014 at 01:47 PM


clonecam117
Joined: Dec 11, 2012

Now a professional VFX/particle effect artist.


Posted: Jun 28, 2014 05:17 PM    Msg. 13 of 15       
Make the player's biped unarmed by default, then have the game sleep like 5 ticks and then reset the starting profile.


clonecam117
Joined: Dec 11, 2012

Now a professional VFX/particle effect artist.


Posted: Jun 29, 2014 04:13 PM    Msg. 14 of 15       
Can LUA be used in Halo CE?


BKTiel
Joined: Mar 18, 2014

strong independent bird needs no cage


Posted: Jun 29, 2014 04:32 PM    Msg. 15 of 15       
I think he means as a reference point.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 1:15 AM 156 ms.
A Halo Maps Website