Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2009-09-24 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
September 24, 2009, 05:45:48 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Hall of Fame
Must Visit it
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: [Help]Burn when below 50 HP  (Read 128 times)
WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« on: August 23, 2009, 03:01:36 PM »

First of all, this is my first post here on the WCS forums, I'm very new to making races, so please bear with me if I make any noobish mistakes.

I've been working on this new tank race for my server. I want it to catch fire for 10 seconds when it gets below 50 health (the 10 seconds is because you burn at 5 hp/sec, so you'll burn until you hit 0), but I don't want to make it a skill of its own for a very simple reason- no one would put points into it.
So, I decided to just add it to the beginning of one of his existing skills' CMDs. The code looks like this:
Code
GeSHi (eventscripts):
es est_gethealth hp_count event_var(userid);if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10
I'm thinking maybe my parentheses aren't right, but aside from that, I really don't know what's wrong with it. When the tank drop below 50 hp, he just doesn't burn. I really need help with this race, can someone give me a hand here?

EDIT:
Feel free to contact me on Xfire or Steam with any help you can provide.
« Last Edit: August 25, 2009, 02:01:51 AM by WhiteKnight » Logged

ScHigGn
Level 2 Apprentice
**
Offline Offline

Germany Germany

Posts: 52



WWW
-]CSF[- ScHigGn.de

myServer 82.98.216.198:27000
(Warning: click connects through Steam)
« Reply #1 on: August 23, 2009, 07:12:12 PM »

Try This

Code:
es_xset hp_count 0; es est_gethealth hp_count event_var(userid);if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10
Logged

WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #2 on: August 23, 2009, 10:58:58 PM »

Thanks for the reply, but that doesn't seem to have worked either. Any other ideas? Maybe the problem lies in the fact that I'm just adding this to the cmd of another skill? Should I put this in the player_spawn_cmd instead?

EDIT:
Alright, I tried adding it to the player spawn and it still didn't work. Here's what my player_spawn_cmd looks like at the moment:
Code:
es wcs_restrict event_var(userid) allow m3 1 0 0;es est_setclipammo event_var(userid) 2 100;es est_speed event_var(userid) 0.5;es_xset hp_count 0; es est_gethealth hp_count event_var(userid);if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10
Since the race IS a tank, it gets only a shotgun, extra ammo, reduced speed, and it's SUPPOSED to catch fire when below 50 HP. It still doesn't work.
« Last Edit: August 23, 2009, 11:07:47 PM by WhiteKnight » Logged

ScHigGn
Level 2 Apprentice
**
Offline Offline

Germany Germany

Posts: 52



WWW
-]CSF[- ScHigGn.de

myServer 82.98.216.198:27000
(Warning: click connects through Steam)
« Reply #3 on: August 23, 2009, 11:08:13 PM »

Code:
event player_hurt
{
es_xset hp_count 0
es est_gethealth hp_count event_var(userid)
if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10
}


Or in a "player_victim" Skill...

Code:
es_xset hp_count 0; es est_gethealth hp_count event_var(userid);if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10
Logged

WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #4 on: August 23, 2009, 11:27:30 PM »

Well, the tank doesn't have any player_victim skills, but where would I add that first code?
Logged

WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #5 on: August 24, 2009, 05:39:30 PM »

bump
Logged

WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #6 on: August 24, 2009, 06:44:47 PM »

Code:
event player_hurt
{
es_xset hp_count 0
es est_gethealth hp_count event_var(userid)
if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10
}
Well, I didn't know where to put that code, so I tried simply taking the middle part and separating it by semicolons and putting it in the player_spawn_cmd. It still didn't work, though.
Code:
es_xset hp_count 0;es est_gethealth hp_count event_var(userid);if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10
That's what I put in the player_spawn_cmd. Can someone else help?
« Last Edit: August 25, 2009, 02:00:00 AM by WhiteKnight » Logged

WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #7 on: August 25, 2009, 02:02:01 AM »

bump.
Logged

WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #8 on: August 28, 2009, 07:54:07 AM »

bump.

I'm a bit disappointed here, people typically reply to other people's help topics quite quickly...
Logged

Crazy
Level 2 Apprentice
**
Offline Offline

United States United States

Posts: 54



« Reply #9 on: August 28, 2009, 07:32:21 PM »

Whiteknight, what I think you have to do is, make a keygroupcreate, and set The Tank to that group. Then go to event player_hurt in your wcs.txt and insert something along the lines of a check to see if the event_var(userID) is in that keygroup, and if he is then you make it check for the health, and if the health is lower than 50 do est_burn.
Logged
WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #10 on: August 30, 2009, 01:58:36 AM »

Whiteknight, what I think you have to do is, make a keygroupcreate, and set The Tank to that group. Then go to event player_hurt in your wcs.txt and insert something along the lines of a check to see if the event_var(userID) is in that keygroup, and if he is then you make it check for the health, and if the health is lower than 50 do est_burn.
Is there no simpler way to do this? I'm really new to creating races, really, so can you give me step-by-step instructions?
Logged

Crazy
Level 2 Apprentice
**
Offline Offline

United States United States

Posts: 54



« Reply #11 on: August 30, 2009, 02:31:45 AM »

When it comes to keysetvalues I'm as lost as you are my friend. All I know is that what I told you will work.

But also, when you guys posted this code...
Code
GeSHi (eventscripts):
es_xset hp_count 0;es est_gethealth hp_count event_var(userid);if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10

You guys forgot 2 parenthesis or however you spell it.

Code
GeSHi (eventscripts):
es_xset hp_count 0;es est_gethealth hp_count event_var(userid);if (server_var(hp_count) <= 50) then es est_Burn event_var(userid) 10
Logged
WhiteKnight
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



WWW
Killplan02
WhiteKnight30303

myServer wcs.pixel-gamers.com:27016
(Warning: click connects through Steam)
« Reply #12 on: August 30, 2009, 06:41:56 AM »

When it comes to keysetvalues I'm as lost as you are my friend. All I know is that what I told you will work.

But also, when you guys posted this code...
Code
GeSHi (eventscripts):
es_xset hp_count 0;es est_gethealth hp_count event_var(userid);if server_var(hp_count) <= 50 then es est_Burn event_var(userid) 10

You guys forgot 2 parenthesis or however you spell it.

Code
GeSHi (eventscripts):
es_xset hp_count 0;es est_gethealth hp_count event_var(userid);if (server_var(hp_count) <= 50) then es est_Burn event_var(userid) 10

I tried it with the updated parentheses, and unfortunately, it still didn't work. Go figure.

EDIT: Perhaps someone with a bit more experience in this area can give us some help here?
« Last Edit: August 30, 2009, 07:51:43 AM by WhiteKnight » Logged

Zawmbee
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 537


The GUARDIAN


« Reply #13 on: September 22, 2009, 06:49:19 PM »

http://forums.eventscripts.com/viewtopic.php?t=1645

or to make things easier

Use event player_victim and if the person is on that race make a keysetvalue to activate...
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
September 23, 2009, 08:14:10 PM
LOL !!!!
September 23, 2009, 07:43:10 PM
..
September 23, 2009, 07:15:15 PM
in that case tc's place sounds interesting for a metal fest ^^
September 23, 2009, 05:15:30 PM
Up there where TeacherCreature stay they dont pay in $$$ they pay man in BEER...and there is never enough beer.
September 23, 2009, 04:55:47 PM
it sound like you don't get paid alot..$$$
September 23, 2009, 02:28:35 PM
It is an online advertising company for local businesses.
September 23, 2009, 01:32:30 PM
TC what kind of company is this one about?
Recent
[Today at 02:30:29 AM]

[Today at 12:52:25 AM]

[September 23, 2009, 11:58:37 PM]

[September 23, 2009, 11:58:07 PM]

[September 23, 2009, 11:58:00 PM]

[September 23, 2009, 11:57:28 PM]

[September 23, 2009, 11:57:01 PM]

[September 23, 2009, 11:55:59 PM]

[September 23, 2009, 11:53:53 PM]

[September 23, 2009, 11:48:43 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.231 seconds with 25 queries.