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 2010-01-15 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
January 15, 2010, 08:11:55 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Remember to check on the FAQ before start posting.
It may save you time and effort.
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1] 2   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: Poison smoke grenade  (Read 169 times)
anuanu
Level 0 Beginner

Offline Offline

United States United States

Posts: 9



« on: December 27, 2009, 04:13:42 AM »

With the following code it kills the player, How would I go about changing it so that it show that I killed him so that XP is given.



Code:
    "skill1_setting"    "es_xsetinfo ep_radius 0.7;es_xsetinfo ep_damage 1|es_xsetinfo ep_radius 0.9;es_xsetinfo ep_damage 1|es_xsetinfo ep_radius 1;es_xsetinfo ep_damage 1|es_xsetinfo ep_radius 1.2;es_xsetinfo ep_damage 1"
    "skill1_cmd"        "es es_xkeysetvalue WCSuserdata event_var(userid) poisonsmoke 1;es es_xdelayed 3 es_xtell event_var(userid) #multi #green[Poison Smoke Grenades] #lightgreenYour Smoke grenades will release a #greenPoison Gas"
    "skill1_sfx"        "0"



Code:
event smokegrenade_detonate
{
   es_xset poisonsmoke 0
   es es_xkeygetvalue poisonsmoke WCSuserdata event_var(userid) poisonsmoke
   es es_xif (server_var(poisonsmoke) = 1) do
   {
   es_xset ep_radius2 150
   es_xset ep_damage2 1
   es_xset smoke_loc 0
   if (server_var(ep_radius) greaterthan "0") then es_xmath ep_radius2 * server_var(ep_radius)
   if (server_var(ep_damage) greaterthan "0") then es_xmath ep_damage2 * server_var(ep_damage)
   es_format ep_radius2 "DamageRadius %1" server_var(ep_radius2)
   es_format ep_damage2 "Damage %1" server_var(ep_damage2)
   es_give event_var(userid) point_hurt
   es_setinfo hurt_index server_var(eventscripts_lastgive)
   es_fire event_var(userid) point_hurt addoutput "OnUser1 !self,kill,-1,20"
   es_fire event_var(userid) point_hurt addoutput server_var(ep_damage2)
   es_fire event_var(userid) point_hurt addoutput server_var(ep_radius2)
   es_fire event_var(userid) point_hurt addoutput "DamageType 32"
   es_createvectorstring smoke_loc event_var(x) event_var(y) event_var(z)
           es_setindexprop server_var(hurt_index) "CBaseEntity.m_vecOrigin" server_var(smoke_loc)
   es_fire event_var(userid) point_hurt TurnOn
   es_fire event_var(userid) point_hurt FireUser1
   es est_playplayer event_var(userid) ambient/machines/gas_loop_1.wav
   es es_delayed 8 es_stopsound event_var(userid) ambient/machines/gas_loop_1.wav
     }
}
Logged
DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #1 on: December 27, 2009, 04:56:07 AM »

sorry mate, If it was python i could help ya. Ermm… send a message to someone, were a helpful community (as long as your willing to actually read tutorials and not just dump all your problems on us and expect us to fix them). Textno, Avast, Oddity, CA.Berettonawak, and Yiyas would be the top go to guys for you.

hope you can get some help. and hey, while your waiting for a respond, why don't you go and read some tutorials! I hear there good reading XD.
    good luck,

        -Dan-
Logged

Quote
theres a thing called copy and paste. I think someone named Bill Gates made it…. -DanMister

Quote
"Genius may have its limitations, but stupidity is not thus handicapped."   Elbert Hubbard
[Oddity]TeacherCreature
Moderator
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 1411



WWW
bonggged

myServer 72.5.102.44:27015
(Warning: click connects through Steam)
« Reply #2 on: December 27, 2009, 05:38:29 PM »

You really wouldnt, that is like making a hurt entity where teh smoke it I bet that code would hurt your teamates also!

Instead of using that create a loop using the location of the detonation and jsut use est_nearcoords
Logged

anuanu
Level 0 Beginner

Offline Offline

United States United States

Posts: 9



« Reply #3 on: December 28, 2009, 02:17:41 AM »

You really wouldnt, that is like making a hurt entity where teh smoke it I bet that code would hurt your teamates also!

Instead of using that create a loop using the location of the detonation and jsut use est_nearcoords



Bare with me on this as I'm still learning how all of this works...Im like the noob of all noobs when it comes to this. But once I got it...I got it.
Logged
DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #4 on: December 28, 2009, 08:31:31 AM »

well, In python terminology what he's saying is:

Code
GeSHi (python):
def smokegrenade_detonate(ev):
   # this will call out the below every time a smoke grenade is detonated.
   userid = ev['userid']
   # named ev['userid'] to userid for quicker reference.
   attacker = ev['attacker']
   # named ev['attacker'] to attacker for quicker reference.
   x = event_var(x)
   # the x coordinate of the smoke grenade detonation location.
   y = event_var(y)
   # the y coordinate of the smoke grenade detonation location.
   z = event_var(z)
   # the z coordinate of the smoke grenade detonation location.
   command = wcs.Command(userid)
   # just named it for easier reference.
   if ev['es_userteam'] == 2:
       filtername = '#ct'
   else:
       filtername = '#t'
# gets the enemy team and stores it as "filtername' (note: if ev['es_userteam'] == 2 then that team is the terrorist, if it == 3 then its the counter-terrorist, if it == 1, the its specs.
   while playerlib.nearCoord((x, y, z), 50, filtername):
   # while is a loop command in python.   playerlib = is a ESP() module which can be used for MANY things.    .nearCoord = a ESP() module command that gets a list of players within a specifed area.     x = event_var(x), the x coordinate of the smoke grenade detonation.    y = event_var(y), the y coordinate of the smoke grenade detonation.     z = event_var(z), the z coordinate of the smoke grenade detonation.  (side note: when x, y, and z are next to each other like this, we call it a vector also known as the location coord's).    50 = diameter from the "vector" and out,  to check for players entering the smoke.    filtername = a filtername is a value we have to "filter" playernames out of the playerlist (note: playerlib.nearCoord is a list of all players in the diameter of 50 in-game units of vector. in this case filter is = to the opposite of your team so that it hurts the other team, not your team.
       command.Damage( 1, 131072, attacker)
       # command = wcs.Command (a name used to call out a WCS Python Command).  .Damage( The WCS Python Command were calling out).    1 = damage, (since the python loop module "while" loops very quick, setting it to one will drain his health at a better rate).    131072 = the type of damage being done (its just extra, its not actually neccesary).    attacker = the attacker who actually threw the smoke grenade in the first place.[code]
 
well I hope this helped you out at atleast i little bit. :D
   Best of luck,
       -Dan-
 
 
 
[/code]
Logged

Quote
theres a thing called copy and paste. I think someone named Bill Gates made it…. -DanMister

Quote
"Genius may have its limitations, but stupidity is not thus handicapped."   Elbert Hubbard
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 198



« Reply #5 on: December 28, 2009, 08:39:24 AM »

You like showing off your Python skills don't ya  Cheesy Cheesy
Logged




DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #6 on: December 28, 2009, 08:42:16 AM »

it deffinately makes me feel good Cheesy, I like being one of the only one on these forums who know he is really fluent at it. I like to help other people, not get helped.    Grin
Logged

Quote
theres a thing called copy and paste. I think someone named Bill Gates made it…. -DanMister

Quote
"Genius may have its limitations, but stupidity is not thus handicapped."   Elbert Hubbard
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 198



« Reply #7 on: December 28, 2009, 08:47:05 AM »

Well thats cool Cheesy

However, i don't know if that will help him much since i don't think hes using Python O.o

Could be wrong tho haha
Logged




DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #8 on: December 28, 2009, 08:48:12 AM »

*whispers* he's already told us he's a noob at both so i don't think it'll matter which one i put it in…. XD *unwhisper*
Logged

Quote
theres a thing called copy and paste. I think someone named Bill Gates made it…. -DanMister

Quote
"Genius may have its limitations, but stupidity is not thus handicapped."   Elbert Hubbard
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 198



« Reply #9 on: December 28, 2009, 08:52:00 AM »

*whispers back* I'm picking up what your puttin down *unwhispers back*
Logged




DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #10 on: December 28, 2009, 09:04:05 AM »

*ponders…* what is gimick talking about? *stops pondering…*
Logged

Quote
theres a thing called copy and paste. I think someone named Bill Gates made it…. -DanMister

Quote
"Genius may have its limitations, but stupidity is not thus handicapped."   Elbert Hubbard
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 198



« Reply #11 on: December 28, 2009, 09:10:24 AM »

*ponders...* Hmm, should i kill Dan for spell my name wrong? *stops pondering...*
Logged




DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #12 on: December 28, 2009, 09:11:36 AM »

 Shocked *wonders why gimick spelled his name wrong in his forum userid….*
Logged

Quote
theres a thing called copy and paste. I think someone named Bill Gates made it…. -DanMister

Quote
"Genius may have its limitations, but stupidity is not thus handicapped."   Elbert Hubbard
[Oddity]TeacherCreature
Moderator
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 1411



WWW
bonggged

myServer 72.5.102.44:27015
(Warning: click connects through Steam)
« Reply #13 on: December 28, 2009, 05:14:10 PM »

Dan i dontk now python but does that loop for "x" seconds? it should


Basically for non python what I am saying is you make a serpentwardwhere the detonation occurs just make it an invisible serpent ward.

Pretty easy.
Logged

anuanu
Level 0 Beginner

Offline Offline

United States United States

Posts: 9



« Reply #14 on: December 30, 2009, 08:37:31 PM »

yea I have no idea of anything you just said lol. I do know that its the ES version not PY.

Yea I dont even know where to begin to change stuff or anything. So far for that smoke grenade code I posted is just a C/P from another race I found on these forums. If you can by chance just walk me through it I should be able to understand whats actually needed for the future.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
January 14, 2010, 06:18:58 PM
here is the topic i created... please put the skills in there: http://warcraft-source.com/board/index.php/topic,9315.0.html
January 14, 2010, 06:15:26 PM
O.K. I started now the project for a new RaceCreator... I will programm it and upload it then.... would be nice if you could make a topic with all skills texno and all others (sepretated in "player_attacker" etc. )
January 14, 2010, 05:30:29 PM
yeah..
January 14, 2010, 04:11:46 PM
Oh i see... not very much skills / ultimates... and just maximum 4 lvl for the skills lol....
January 14, 2010, 04:08:57 PM
thanks, are there any bugs ?? I can't fix it because first : don't have the programm code and second : don't know if he wrote it in C#...^^
January 14, 2010, 11:37:50 AM
Here's the link... maby you can update it Termi ? "http://warcraft-source.com/board/index.php/topic,6199.0.html"

http://warcraft-source.com/board/index.php/topic,6199.0.html
January 13, 2010, 07:26:02 PM
No prob dude
Recent
[Today at 08:04:25 PM]

[Today at 07:28:23 PM]

by NeSo
[Today at 07:20:35 PM]

[Today at 06:07:34 PM]

[Today at 05:01:54 PM]

[Today at 04:18:29 AM]

[Today at 03:10:50 AM]

[Today at 02:51:49 AM]

[January 14, 2010, 06:58:10 PM]

[January 14, 2010, 03:48:10 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.156 seconds with 24 queries.