Survival Element

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
thugsta1
Posts: 12
Joined: Fri Apr 18, 2014 10:15 am

Survival Element

Post by thugsta1 »

Hi

I would like to rip (or recreate, whichever is easier) Left 4 Dooms survival element of having to pickup-able medkit/stimpacks (or in this case of alphaent's mod, pills) & to use them the player is forced to stand still while the medkit is applied, while the pills are applied quicker for the smaller health & both items are only able to be picked up once each so if you have one in inventory you will need to use it first & then scavenge for another medkit/stimpack (but can hold both 1 stim & 1 medkit), I would of just used the L4Doom mod but i'd like to use this feature only so i can use it with other mods like weapon based ones (rga3 for example or brutal doom)

Any help will be greatly appreciated as i been loving the survival element that it brings to the table. :)
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: Survival Element

Post by amv2k9 »

Make the medkit a [wiki]CustomInventory[/wiki]-inheriting item that runs a script. The script will, for example, give the player a [wiki]PowerSpeed[/wiki]-inheriting powerup that decreases the player's speed to zero, then a few tics later, after the player has stopped, give the player the health. There are other methods to stop the player besides a powerup, but I'm guessing you want something that doesn't stop the player instantaneously.
thugsta1
Posts: 12
Joined: Fri Apr 18, 2014 10:15 am

Re: Survival Element

Post by thugsta1 »

I would prefer once the player wants to apply the med/stim they are stop immediately in there tracks as this way they need to find cover 1st & saves them from using it as they slide off a cliff or something.

Wow are you the guy that made Smart Scavenger? Thats a great mod, but may i ask is there a chance you can add it to your mod? as i know jack crap about zdoom & maybe armor that can revive your friend in multiplayer & take away half of it after, i can even donate to the cause if you can help out?

Thanks.
thugsta1
Posts: 12
Joined: Fri Apr 18, 2014 10:15 am

Re: Survival Element

Post by thugsta1 »

I thought it could be simpler (at least to an air head like me) if i do

Code: Select all

actor MedPatch : HealthPickup 2011
{
  health 10
  HealthPickup.Autouse 0
  Inventory.MaxAmount 1
  Inventory.Icon "I_STMP"
  Inventory.PickupMessage "You picked up the Med patch."
  States
  {
  Spawn:
    STMP A -1
    Stop
  }
}

actor MedKit : HealthPickup 7012
{
  health 25
  HealthPickup.Autouse 0
  Inventory.MaxAmount 1
  Inventory.Icon "I_MDKT"
  Inventory.PickupMessage "You picked up the Medkit."
  States
  {
  Spawn:
    MEDK A -1
    Stop
  }
}
& some how use

Code: Select all

Function void PlayerFreeze (bool IsOn)
{
	if(IsOn)
	{
		Thing_Stop(TID_Player);
		SetPlayerProperty(TRUE, ON, PROP_TOTALLYFROZEN);
		if(CheckActorInventory(TID_Player, "PowerTimeFreezer") == 0)
			GiveActorInventory(TID_Player, "PowerGiver_ACSTimeFreeze", 1);
	}
	else
	{
		SetPlayerProperty(TRUE, OFF, PROP_TOTALLYFROZEN);
		TakeActorInventory(TID_Player, "PowerTimeFreezer", 0x7fffffff);
	}
}
to freeze the player when they want to apply med/stim. But i cant make heads or tails of this or if this is acs etc.
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: Survival Element

Post by amv2k9 »

thugsta1 wrote:Wow are you the guy that made Smart Scavenger? Thats a great mod, but may i ask is there a chance you can add it to your mod?
I wouldn't add it, as that's a mechanic very different from Doom, and Smart Scavenger is intended to be as intuitive as possible for people used to classic Doom.
thugsta1
Posts: 12
Joined: Fri Apr 18, 2014 10:15 am

Re: Survival Element

Post by thugsta1 »

Happy new year EVERYONE :)

EDIT:- Didnt notice latest version of scavenger...Close thread please if need be.
Locked

Return to “Editing (Archive)”