OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Gundato on 02 Sep 2006, 03:05:21

Title: Loadout editing: Player only?
Post by: Gundato on 02 Sep 2006, 03:05:21
I am currently working on a rather simple (but potentially entertaining) mission. It involves a small squad of ill-equipped Resistance Fighters (Hunting Rifles and Kozlices. And anything else I can find that suits them) against an overpowering force of Russian Infantry (Might end up going American since the m113 is less of a threat to Infantry than the BMP).

Anyway, I want to give the player a few options as far as gear goes. I want to make 'nades and maybe even mortars useful for more than just expending to make room for AT weapons or more ammo. But I also want to give myself (and the player, probably) more replay by allowing you to spawn with a different gun. However, I don't want to have to take command. Command ops get boring.

So is there a way to allow the player to goof around with his loadout and the like, but not be the leader of the squad (I want to be in a squad for the terror of seeing your buddies fall)?
Title: Re: Loadout editing: Player only?
Post by: macguba on 02 Sep 2006, 10:14:43
Couple of workarounds here.   You can make the player not in a group, or rather in a group of himself, and then use a join command to make him join the gang at the start of the mission.

Alternatively, make him in the group as usual and the mission starts at a small ammo depot where the player can hang around and pick up what he wants.   MAke sure the group leader waits for him.

If you want to get cute you could make or borrow a dialogue that appears at the start of the mission that allows the player to change his gear.
Title: Re: Loadout editing: Player only?
Post by: Gundato on 02 Sep 2006, 21:16:07
So there is no way that doesn't involve tricks? Ah well, shouldn't be too much of a problem, thanks.
Now I just need to figure out how to disable a streetlight by default, or detect the destruction of one (After some preliminary testing, it was downright epic and beautiful with NVG and pitch black night).
Title: Re: Loadout editing: Player only?
Post by: macguba on 02 Sep 2006, 21:24:59
I've thought of something else.   Make the player the group leader, so he can do Gear selection.   At the start of the mission, have him leave the group (join grpNull) the rejoin it.   That might work.

I think its the switchlight command for lampposts.    You can check whether its been destroyed with getDammage.
Title: Re: Loadout editing: Player only?
Post by: PetriHonka on 16 Sep 2006, 22:01:52
For the lamp try init:this lightIsOn False or init:this lightIsOff
Title: Re: Loadout editing: Player only?
Post by: Planck on 16 Sep 2006, 22:48:44
AH, lightIsOn only checks if the light is on, it does not switch it on.

lightIsOff does not exist.


Planck
Title: Re: Loadout editing: Player only?
Post by: Nixer6 on 17 Sep 2006, 03:24:15
You could just have an ammo crate around nearby, that contains only the weapons you want in it.

Then just choose what you llike..............................
Title: Re: Loadout editing: Player only?
Post by: PetriHonka on 18 Sep 2006, 21:58:48
That would not look all to good if there was either one ammo crate with so many weaps. it takes 30 secs to scroll through it all (ive seen it before) or loads of ammo crates strewn around the place which isn't very covert resistance-like.
Try hunting around for the respawn script used in minibattlefield 1985 (nogova mp map) and edit out the onplayerdeath respawn commands. (NOT actual commands)