Stinkyfax
I <3 WCS
Level 7 Expert
   
Offline
United Kingdom
Posts: 1903
 XrushiovmyServer 84.55.62.45:27016(Warning: click connects through Steam)
|
 |
« on: September 09, 2007, 09:26:52 AM » |
|
Hi everyone. It's the first version of wcs_dalias function, you may already seen it in races but now i'll post it officialy here. Few mounths ago i was writing an ability which would regenerate player's hp with time by pressing ability button. And i faced the problem: i need to make tones of same strings with only one difference: es_delayed 2, es_delayed 4, es_delayed 6.... I couldn't make: es_delayed 2 racealias_22 in racealias_22 call racealias_23 and in racealias_23 es_delayed 2 racealias_22 so it executes racealias_22 in cycle as many times as i set up. The problem was: event_vars and server_vars are changed, and it executes alias, but if i regen hp, it regenerates hp not for me but for smbody else who used ultimate and in server_var(wcs_userid) now his userid. I think many of coders faced this problems. I tried to avoid it until last race when coded aura. I also found out that in last few weeks there were many requests on poison, flying rocket effect, etc. they all require delayed execute. I don't think that they would love ot make custom commands for every skill they want to make like this only because there is no possibility to use it without making new command. So i decided to make new command wcs_dalias, now i explain how this version works. Restrictions: it can carry maximum up to 15 variables now. Minuses: 1. If you set up only few variables, it will try anyway to get all 15 variables (a bit slows process). 2. Hard to understand.
HowTo: First of all you should understand what it does, example (this skill was coded by Stinkyfax, and effects were made by Holliday):
Here is what you should understand:
es_xdelayed 1.7 wcs_dalias racealias_1p32 server_var(wcs_tmp2) server_var(wcs_tmp3) server_var(wcs_tmp4)
by typing this command you are saving variables for "racealias_1p32" after delay, and executes this alias. Unfortunatly you have to set up all variables by wcs_tmp1....15 and work with them, a bit hard to remember which wcs_tmp* what means.
Here is the second example with unique effects by Holliday and codes by Stinkyfax, more extended and hard (for more advanced coders):
Another example:
As you see, it can be used for complex skills too.
wcs_dalias function was coded by Stinkyfax.
Installation: You will find instruction inside of the file.
Feedback is welcome.
Short INSTALLATION instructions for WCS 0.77:
INSERT into es_WCSultimates.txt: es_xexists ex command wcs_dalias es es_xif (server_var(ex) = 0) then es_xregcmd wcs_dalias wcs/WCSultimates/wcs_dalias "Executes alias with delay without loosing data"
AFTER: if (server_var(ex) = 0) then es_xregcmd wcs_warden wcs/WCSultimates/wcs_warden "Warden, deals damage on nearby enemies"
INSERT: In the total end of es_WCSultimates.txt (after the last "}")
[attachment deleted by admin - older than 200 days!]
|
|
|
|
« Last Edit: July 12, 2008, 06:38:51 PM by Stinkyfax »
|
Logged
|
|
|
|
|
[Oddity]TeacherCreature
|
 |
« Reply #1 on: September 09, 2007, 08:02:25 PM » |
|
Of course awesome breakthrough...
can you make the second example a physpush to the variable coord instead of shooting a "sonic wave' That would be cool....
Anyway you get the programmer of the month award for this one !
|
|
|
|
|
Logged
|
|
|
|
Stinkyfax
I <3 WCS
Level 7 Expert
   
Offline
United Kingdom
Posts: 1903
 XrushiovmyServer 84.55.62.45:27016(Warning: click connects through Steam)
|
 |
« Reply #2 on: September 09, 2007, 08:23:32 PM » |
|
explain me more what you want with physpush, and why it should be stepped? Why not just physpush to the finish coordinates without steps?
|
|
|
|
|
Logged
|
|
|
|
|
[Oddity]TeacherCreature
|
 |
« Reply #3 on: September 09, 2007, 09:12:09 PM » |
|
I want the ultimate on [Oddity]Triceratop
to be a physpush to coord so that it will be like a giant dinosaur stampede ! or a charge !
|
|
|
|
|
Logged
|
|
|
|
Stinkyfax
I <3 WCS
Level 7 Expert
   
Offline
United Kingdom
Posts: 1903
 XrushiovmyServer 84.55.62.45:27016(Warning: click connects through Steam)
|
 |
« Reply #4 on: September 09, 2007, 10:00:35 PM » |
|
bla bla bla, you told me it before. But what's the point of using delayed aliases for it? i don't see any reason for it.
|
|
|
|
|
Logged
|
|
|
|
|
[Oddity]TeacherCreature
|
 |
« Reply #5 on: September 10, 2007, 12:03:57 AM » |
|
ok I will try it with out..
Why use delayed alias for sonic boom ?
|
|
|
|
|
Logged
|
|
|
|
Stinkyfax
I <3 WCS
Level 7 Expert
   
Offline
United Kingdom
Posts: 1903
 XrushiovmyServer 84.55.62.45:27016(Warning: click connects through Steam)
|
 |
« Reply #6 on: September 10, 2007, 06:03:41 AM » |
|
did you check this race? if you did you would understand.
|
|
|
|
|
Logged
|
|
|
|
Stinkyfax
I <3 WCS
Level 7 Expert
   
Offline
United Kingdom
Posts: 1903
 XrushiovmyServer 84.55.62.45:27016(Warning: click connects through Steam)
|
 |
« Reply #7 on: September 22, 2007, 08:36:35 AM » |
|
Did you read all what i've posted here? if yes i'll give more information about how it works soon.
|
|
|
|
|
Logged
|
|
|
|
|
NovaKiller
|
 |
« Reply #8 on: September 22, 2007, 09:36:03 AM » |
|
Yes i read the whole post. I see it can make you so it repeats in serval times? Is that right? I mean so it can repeat the same 2 race alias in mayby 5 times.
But i really dont know how it should work. I know i should use wcs_dalias <the racealias> then something i dont know what is.
|
|
|
|
|
Logged
|
|
|
|
|
Frodo
|
 |
« Reply #9 on: September 22, 2007, 09:54:49 AM » |
|
i think it's wcs_dalias <yourracealiashere> <your variable you will use>;<again>;<and again....>;<blablabla>"
|
|
|
|
|
Logged
|
 Actually I found it as best Bux ever. Everything's automated!
|
|
|
|
NovaKiller
|
 |
« Reply #10 on: September 22, 2007, 01:15:20 PM » |
|
so if its like a alias where its like Invis to Visibel and back. Its like this?: es_dealyed 2 wcs_dalias racealias_invis server_var(wcs_userid) server_var(wcs_invis) wcs_dalias racealias_visibel server_var(wcs_userid) ? would that mayby work?
|
|
|
|
|
Logged
|
|
|
|
Stinkyfax
I <3 WCS
Level 7 Expert
   
Offline
United Kingdom
Posts: 1903
 XrushiovmyServer 84.55.62.45:27016(Warning: click connects through Steam)
|
 |
« Reply #11 on: September 22, 2007, 02:58:20 PM » |
|
a bit not like this, if you don't get how it works fully then better rename variables to wcs_tmp1 wcs_tmp2 before use of command. but yes, it will do what you want if u use wcs_tmp1 wcs_tmp2....
|
|
|
|
|
Logged
|
|
|
|
|
NovaKiller
|
 |
« Reply #12 on: September 30, 2007, 09:38:45 AM » |
|
I finally got it ( i think ) i just gonna post something whit it.  "skill1_setting" "es_xsetinfo wcs_tmp1 20;es_xsetinfo wcs_tmp2 1;es_xsetinfo wcs_tmp3 5|es_xsetinfo wcs_tmp1 30;es_xsetinfo wcs_tmp2 1;es_xsetinfo wcs_tmp3 10|es_xsetinfo wcs_tmp1 40;es_xsetinfo wcs_tmp2 2;es_xsetinfo wcs_tmp3 15|es_xsetinfo wcs_tmp1 50;es_xsetinfo wcs_tmp2 2;es_xsetinfo wcs_tmp3 20" "racealias_repeat1" "es es_xmath server_var(wcs_tmp3) - 1;es es_delayed 0.4 wcs_dalias racealias_repeat2 server_var(wcs_tmp1) server_var(wcs_tmp2) server_var(wcs_tmp3)" "racealias_repeat2" "es est_cashadd event_var(userid) server_var(wcs_money);es est_health event_var(userid) + server_var(wcs_tmp2);if (server_var(wcs_tmp3) > 0) then racealias_repeat1" "skill1_cmd" "racealias_repeat1" "skill1_sfx" "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es est_effect 3 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 1 3 6 255 255 0 255" This would work right? Just something i made. It was just to test.
|
|
|
|
|
Logged
|
|
|
|
Incognito
Level 0 Beginner
Offline
 United States
Posts: 9
somebodystolemypants
|
 |
« Reply #13 on: May 31, 2008, 02:24:33 AM » |
|
ok im having a problem the line in the instructions "es_xexists wcs_exists command wcs_warden" i cannot find in my servers wcsultimate text file i did find "es_xexists ex command wcs_warden" and i cannot find anything saying wcs_trap
incog.
|
|
|
|
|
Logged
|
|
|
|
|
killsign
|
 |
« Reply #14 on: July 12, 2008, 05:51:14 PM » |
|
ok here is a noob question but where at in the ultimates file do you put it. Should it be the last thing in the file ?
|
|
|
|
|
Logged
|
He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss the abyss also gazes into you...
|
|
|
|