Spawnable healthpacks in CoD2
Moderator: Core Staff
Re: Spawnable healthpacks in CoD2
My knowledge of mapping/scripting is like 0 but why don't you make it so that the player keeps getting the extra health.
For example, you pick up your extra health and it expires after 0.5 second then you make it that he gets another health pack at that moment and keep repeating it for the time you want it to last.
Hope that's a bit clear
For example, you pick up your extra health and it expires after 0.5 second then you make it that he gets another health pack at that moment and keep repeating it for the time you want it to last.
Hope that's a bit clear
-=[[CoDJumper.com Movies]]=-
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: Spawnable healthpacks in CoD2
Stopped reading there.My knowledge of mapping/scripting is like 0
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: Spawnable healthpacks in CoD2
hm there must be a way to achieve this - they've done it in quake 3 too Maybe with too much time on my hands I have a look at some quake scripts
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: Spawnable healthpacks in CoD2
I tried something with the _healthoverlay.gsc
When I change the lines there you continously get the breathingsound have no clue what it realy does ?
Code: Select all
playerHealthRegen()
{
self endon("end_healthregen");
////////////////////////////////////////////
maxhealth = 200;
////////////////////////////////////////////
oldhealth = maxhealth;
player = self;
health_add = 0;
regenRate = 0.1; // 0.017;
veryHurt = false;
thread playerBreathingSound(maxhealth * 0.35);
lastSoundTime_Recover = 0;
hurtTime = 0;
newHealth = 0;
for (;;)
{
wait (0.05);
if (player.health == maxhealth)
{
veryHurt = false;
continue;
}
if (player.health <= 0)
return;
wasVeryHurt = veryHurt;
ratio = player.health / maxHealth;
if (ratio <= level.healthOverlayCutoff)
{
veryHurt = true;
if (!wasVeryHurt)
{
hurtTime = gettime();
}
}
if (player.health >= oldhealth)
{
if (gettime() - hurttime < level.playerHealth_RegularRegenDelay)
continue;
if (gettime() - lastSoundTime_Recover > level.playerHealth_RegularRegenDelay)
{
lastSoundTime_Recover = gettime();
self playLocalSound("breathing_better");
}
if (veryHurt)
{
newHealth = ratio;
if (gettime() > hurtTime + 3000)
newHealth += regenRate;
}
else
newHealth = 1;
if (newHealth > 1.0)
newHealth = 1.0;
if (newHealth <= 0)
{
// Player is dead
return;
}
player setnormalhealth (newHealth);
oldhealth = player.health;
continue;
}
oldhealth = player.health;
health_add = 0;
hurtTime = gettime();
}
}
Re: Spawnable healthpacks in CoD2
Oh i'm sorry for trying to helpRezil wrote:Stopped reading there.My knowledge of mapping/scripting is like 0
-=[[CoDJumper.com Movies]]=-
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: Spawnable healthpacks in CoD2
He just kidding m8, all help is usefullHoogie wrote:Oh i'm sorry for trying to helpRezil wrote:Stopped reading there.My knowledge of mapping/scripting is like 0
Who is online
Users browsing this forum: No registered users and 2 guests