|
Real_Wolf
|
 |
« Reply #30 on: June 27, 2007, 03:13:47 AM » |
|
Yes, exactly, when coding syntax errors are easy to make.
SO those two are the small problems, just fix em up. Add the extra bracket, ie:
es es_xif (server_var(wcs_x1) >= 0 ) then.....
so heres the full code for the block:
block wcs_ulti_scorpion { // wcs_userid, and wcs_radius es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid) es_xsetinfo wcs_counter 0 es es_xgetplayerteam wcs_team server_var(wcs_userid) es_xsetinfo wcs_x 0 es_xsetinfo wcs_y 0 es_xsetinfo wcs_z 0 es_xsetinfo wcs_teleportenemy 0 // check teams (T=2, CT=3) es_xsetinfo wcs_team_target 0 es es_xif (server_var(wcs_team) = 2) do { es_xsetinfo wcs_team_target 3 es_xsetinfo wcs_team_targetn "#c!d" } es es_xif (server_var(wcs_team_target) != "0") do { alias wcs_ulti_scorpion_replace "es es_xsetinfo wcs_x server_var(wcs_x2);es es_xsetinfo wcs_y server_var(wcs_y2);es es_xsetinfo wcs_z server_var(wcs_z2);es es_xsetinfo wcs_targetenemy server_var(wcs_targetid)" alias wcs_ulti_scorpion_closest "es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2;es es_xmath wcs_x2 - server_var(wcs_x1);es es_xmath wcs_y2 - sever_var(wcs_y1);es es_xmath wcs_z2 - server_var(wcs_z1);es es_xif (server_var(wcs_x2) < 0) then es_xmath wcs_x * -1;es es_xif (server_var(wcs_y2) < 0) then es_xmath wcs_y * -1;es es_xif (server_var(wcs_z2) < 0) then es_xmath wcs_z * -1;es_xcopy wcs_x3 wcs_x;es_xcopy wcs_y3 wcs_y;es_xcopy wcs_z3 wcs_z;es es_xmath wcs_x3 - server_var(wcs_x2);es es_xmath wcs_y3 - server_var(wcs_y2);es es_xmath wcs_z3 - server_var(wcs_z2);es_xsetinfo wcs_activate 1;es es_xif (server_var(wcs_x3) < 0) then es_xsetinfo wcs_activate 0;es es_xif (server_var(wcs_y3) < 0) then es_xsetinfo wcs_activate 0;es es_xif (server_var(wcs_z3) < 0) then es_xsetinfo wcs_activate 0;es es_xif (server_var(wcs_activate) = 1) then wcs_ulti_scorpion_replace" es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then wcs_ulti_scorpion_closest" es_xsetinfo wcs_activate 0 es_xif (server_var(wcs_x) != 0) then es_xsetinfo wcs_activate 1 es_xif (server_var(wcs_y) != 0) then es_xsetinfo wcs_activate 1 es_xif (server_var(wcs_z) != 0) then es_xsetinfo wcs_activate 1 es es_xif (server_var(wcs_activate) = 1) do { es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_teleportenemy) es es_xmath wcs_x1 - server_var(wcs_x2) es es_xmath wcs_y1 - server_var(wcs_y2) es es_xif (server_var(wcs_x1) >= 0 ) then es_xmath wcs_x2 - 10 es es_xif (server_var(wcs_y1) >= 0 ) then es_xmath wcs_y2 - 10 es es_xif (server_var(wcs_x1) < 0 ) then es_xmath wcs_x2 + 10 es es_xif (server_var(wcs_y1) < 0 ) then es_xmath wcs_y2 + 10 es ma_teleport server_var(wcs_userid) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) es es_xtell server_var(wcs_userid) #green Ultimate Activated: You were teleported behind the enemy } es es_xif (server_var(wcs_activate) = 0) do { es est_csay server_var(wcs_userid) "No one within range!" } }
}
|
|
|
|
|
Logged
|
=|[K|T]|= Real Wolf 
|
|
|
|
HOLLIDAY
|
 |
« Reply #31 on: June 27, 2007, 03:39:31 AM » |
|
it always says no one within range
|
|
|
|
|
Logged
|
|
|
|
RJ2002
Level 0 Beginner
Offline
 Germany
Posts: 8
|
 |
« Reply #32 on: June 27, 2007, 10:18:04 AM » |
|
There is one thing i don´t understand.
...es_xcopy wcs_x3 wcs_x;es_xcopy wcs_y3 wcs_y;es_xcopy wcs_z3 wcs_z;...
Where does the wcs_x3 comming from? Its not declared in the block and wcs_x is 0. Further in the code there is
..;es es_xmath wcs_x3 - server_var(wcs_x2);es es_xmath wcs_y3 - server_var(wcs_y2)...
If wcs_x3 and so on is not declared and wcs_x is 0 wouldn´t this operation give a negative value?? So ..es es_xif (server_var(wcs_x3) < 0) then es_xsetinfo wcs_activate 0.. would always be 0, right?
Couldn´t you bring in the range value set in the skill config? Then calculate the distance between the players and compare with the range value.
I don´t know if the coding is right but the calculation should.
es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2;es es_xmath wcs_x2 - server_var(wcs_x1);es es_xmath wcs_y2 - sever_var(wcs_y1);es es_xmath wcs_z2 - server_var(wcs_z1);es_xmath wcs_x2*server_var(wcs_x2);es_xmath wcs_y2*server_var(wcs_y2),es_xmath wcs_z2*server_var(wcs_z2);es_xmath wcs_x2+server_var(wcs_y2);es_xmath wcs_x2+server_var(wcs_z2),
at the end of this calculation wcs_x2 should be the square distance between the two positions.(i don´t know how to calculate a square root of this in est.) Now we can compare it with the range value and have a control parameter for the ultimate. But maybe its total nonsense :mrgreen:
|
|
|
|
|
Logged
|
|
|
|
|
AAS
|
 |
« Reply #33 on: July 06, 2007, 09:20:46 AM » |
|
Holliday I have one question - Back teleport doen't work correrct: it doesn't teleport me to enemies back - it teleports enemies to my back!!! :lol:
|
|
|
|
|
Logged
|
.:ColliSeuM:. [RPG + WCS Mods] 217.65.10.62:27041
|
|
|
|
HOLLIDAY
|
 |
« Reply #34 on: July 06, 2007, 10:59:03 AM » |
|
so what was your question?............ ..........................lol skill1 Bloody Spear : Impale a Kunai tiped Rope into your enemy and pull them towards you player_attacker skill. when you hit them there is a good chance that they will teleport to you skill3 Back Teleport : Teleport to the enemy that hit you. a player_victim skill when you hit them there is a smaller chance of you teleporting to them however there is a glitch in this race..... sometimes when you hit the enemy they will teleport back to spawn but if the only thing that didnt work correctly was that the enemy teleports to you........... then everything was working correctly 
|
|
|
|
|
Logged
|
|
|
|
|
AAS
|
 |
« Reply #35 on: July 06, 2007, 01:05:04 PM » |
|
Hm... U didn't understand me... Firts skill works but 3 - which should teleport u to enemies back doesn't. For example: somebody shoot u and after a few sec teleport besides u!!! (not u teleports besides enemie but enemie besides u)
|
|
|
|
|
Logged
|
.:ColliSeuM:. [RPG + WCS Mods] 217.65.10.62:27041
|
|
|
|
HOLLIDAY
|
 |
« Reply #36 on: July 06, 2007, 02:25:14 PM » |
|
so they shoot you and teleport beside you? never seen that one.. yeah this race is full of bugs. the reason i still have it posted is because of all the work that has been put into fixing it. mainly by Real_Wolf....i think if i piece it together right with his ultimate block it will be a nice race
|
|
|
|
|
Logged
|
|
|
|
ProjectProFuze
Level 0 Beginner
Offline
 United States
Posts: 13
|
 |
« Reply #37 on: July 06, 2007, 03:52:47 PM » |
|
I for one have been waiting on you to finish this race since page 1. The skills that do work right are sweet.
|
|
|
|
|
Logged
|
|
|
|
|
Real_Wolf
|
 |
« Reply #38 on: July 07, 2007, 06:55:43 AM » |
|
RJ, you have to look at the whole coding.
It checks the value, then it INVERTS IT IF ITS NEGATIVE, checks to see if its smaller, etc, and finally if it is then it will rechange the value.
I may have made a mistake, but i really don't want to have to look through ALL the coding again, theres alot of math in there, which i used alot of logic to calculate.
It is entirely possible that theres a problem, but its got the absolute value for a reason.
Also, wcs_x is merely a placeholder variable to make the check if anyone else is closer. in the end its not used, its recalculated.
And as for the es_xcopy, thats so that wcs_x isn't changed. And i think i might need a server_var(wcs_x) instead of wcs_x. Oh, and i think i screwed up the copy+paste earlier, just having looked.
block wcs_ulti_scorpion { // wcs_userid, and wcs_radius es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid) es_xsetinfo wcs_counter 0 es es_xgetplayerteam wcs_team server_var(wcs_userid) es_xsetinfo wcs_x 0 es_xsetinfo wcs_y 0 es_xsetinfo wcs_z 0 es_xsetinfo wcs_teleportenemy 0 // check teams (T=2, CT=3) es_xsetinfo wcs_team_target 0 es es_xif (server_var(wcs_team) = 2) do { es_xsetinfo wcs_team_target 3 es_xsetinfo wcs_team_targetn "#c!d" } es es_xif (server_var(wcs_team_target) != "0") do { alias wcs_ulti_scorpion_replace "es es_xsetinfo wcs_x server_var(wcs_x2);es es_xsetinfo wcs_y server_var(wcs_y2);es es_xsetinfo wcs_z server_var(wcs_z2);es es_xsetinfo wcs_targetenemy server_var(wcs_targetid)" alias wcs_ulti_scorpion_absolute "es es_xif (server_var(wcs_x2) < 0) then es_xmath wcs_x2 * -1;es es_xif (server_var(wcs_y2) < 0) then es_xmath wcs_y2 * -1;es es_xif (server_var(wcs_z2) < 0) then es_xmath wcs_z2 * -1;es_xcopy wcs_x3 wcs_x;es_xcopy wcs_y3 wcs_y;es_xcopy wcs_z3 wcs_z;es es_xif (server_var(wcs_x3) < 0) then es_xmath wcs_x3 * -1;es es_xif (server_var(wcs_y3) < 0) then es_xmath wcs_y3 * -1;es es_xif (server_var(wcs_z3) < 0) then es_xmath wcs_z3 * -1" alias wcs_ulti_scorpion_closest "es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);es es_xmath wcs_x2 - server_var(wcs_x1);es es_xmath wcs_y2 - sever_var(wcs_y1);es es_xmath wcs_z2 - server_var(wcs_z1);wcs_ulti_scorpion_absolute;es es_xmath wcs_x3 - server_var(wcs_x2);es es_xmath wcs_y3 - server_var(wcs_y2);es es_xmath wcs_z3 - server_var(wcs_z2);es_xsetinfo wcs_activate 1;es es_xif (server_var(wcs_x3) < 0) then es_xsetinfo wcs_activate 0;es es_xif (server_var(wcs_y3) < 0) then es_xsetinfo wcs_activate 0;es es_xif (server_var(wcs_z3) < 0) then es_xsetinfo wcs_activate 0;es es_xif (server_var(wcs_activate) = 1) then wcs_ulti_scorpion_replace" es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then wcs_ulti_scorpion_closest" es_xsetinfo wcs_activate 0 es_xif (server_var(wcs_x) != 0) then es_xsetinfo wcs_activate 1 es_xif (server_var(wcs_y) != 0) then es_xsetinfo wcs_activate 1 es_xif (server_var(wcs_z) != 0) then es_xsetinfo wcs_activate 1 es es_xif (server_var(wcs_activate) = 1) do { es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_teleportenemy) es es_xmath wcs_x1 - server_var(wcs_x2) es es_xmath wcs_y1 - server_var(wcs_y2) es es_xif (server_var(wcs_x1) >= 0 ) then es_xmath wcs_x2 - 10 es es_xif (server_var(wcs_y1) >= 0 ) then es_xmath wcs_y2 - 10 es es_xif (server_var(wcs_x1) < 0 ) then es_xmath wcs_x2 + 10 es es_xif (server_var(wcs_y1) < 0 ) then es_xmath wcs_y2 + 10 es ma_teleport server_var(wcs_userid) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) es es_xtell server_var(wcs_userid) #green Ultimate Activated: You were teleported behind the enemy } es es_xif (server_var(wcs_activate) = 0) do { es est_csay server_var(wcs_userid) "No one within range!" } }
}
|
|
|
|
|
Logged
|
=|[K|T]|= Real Wolf 
|
|
|
|
[Oddity]TeacherCreature
|
 |
« Reply #39 on: July 09, 2007, 12:23:25 PM » |
|
Ok if I add this block than where is the updated character.
If I try what is posted on teh first page none of the skills work.
I tried using your rewrite with aliases, and the ultiamte code and it still doesn't work.
Looks like you guys put work into this is there a finished code we can all copy?
|
|
|
|
|
Logged
|
|
|
|
ProjectProFuze
Level 0 Beginner
Offline
 United States
Posts: 13
|
 |
« Reply #40 on: July 10, 2007, 12:25:11 AM » |
|
i agree with teacher creature. you should post an update of this race since there are so many fixes that have taken place.
|
|
|
|
|
Logged
|
|
|
|
|
Real_Wolf
|
 |
« Reply #41 on: July 10, 2007, 01:22:57 AM » |
|
Problem is, only holliday knows what works and what doesn't, i don't run this race at all (atm). And as such, i have not actually tested teh ultimate coding, i only know that it works through understanding the coding in it. Which means if i made a mistake i won't know about it.
|
|
|
|
|
Logged
|
=|[K|T]|= Real Wolf 
|
|
|
|
HOLLIDAY
|
 |
« Reply #42 on: July 12, 2007, 04:10:28 AM » |
|
im not shure about the ultimate havent seen any bugs yet but the first skill seemss to work good.. havent tested it fully but you can try this and if you havent copied this one yet dont forget the zip on page one "" { "name" "Scorpion" "author" "HOLLIDAY" "required_level" "20" "maximum_level" "0" "allow_only" "0" "teamlimit" "0" "teamlimit" "0" "preloadcmd" "0" "player_spawn_cmd" "es est_playplayer event_var(userid) Hollidaysounds/welcome.wav" "round_start_cmd" "0" "round_end_cmd" "0" "numberofskills" "4" "numberoflevels" "5" "skillnames" "Bloody Spear|Hellfire|Back Teleport|Teleport Attack" "skilldescr" "Impale a Kunai tiped Rope into your enemy and pull them towards you|Summon the fires of Hell to burn your enemy|Teleport to the enemy that hit you|Teleport behind your enemy" "skillcfg" "player_attacker|player_attacker|player_victim|player_ultimate"
"skill1_setting" "es_xsetinfo wcs_chance 28|es_xsetinfo wcs_chance 33|es_xsetinfo wcs_chance 30|es_xsetinfo wcs_chance 45|es_xsetinfo wcs_chance 50" "skill1_cmd" "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es est_playplayer event_var(userid) Hollidaysounds/getoverhere.wav 1.0;es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es es_xmath wcs_z1 + 80;es es_xmath wcs_z2 - 40;es est_teleport event_var(userid) event_var(attacker);es es_xdelayed 0.1 est_setaim event_var(attacker) event_var(userid) +10;es_xtell event_var(userid) : Get Over Here!." "skill1_sfx" "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es_xmath wcs_z1 + 20;es_xmath wcs_z2 + 20;es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then est_Effect 3 #a 0 sprites/tp_beam001.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 2 5 255 151 67 255" "skill2_setting" "es_xrand wcs_rand 1 5;es_xrand wcs_damage 7 10|es_xrand wcs_rand 1 4;es_xrand wcs_damage 9 11|es_xrand wcs_rand 1 3;es_xrand wcs_damage 10 13|es_xrand wcs_rand 1 2;es_xrand wcs_damage 12 14|es_xrand wcs_rand 1 1;es_xrand wcs_damage 15 18" "racealias_scorp2" "es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_damage);es est_csay event_var(attacker) HellFire!;es est_csay event_var(userid)HellFire!" "skill2_cmd" "es es_xif (server_var(wcs_rand) = 1) then est_isalive wcs_alive event_var(userid);es es_xif (server_var(wcs_rand) = 1) then es_xif (server_var(wcs_alive) = 1) then racealias_scorp2" "skill2_sfx" "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es est_effect 10 #a 0 sprites/flatflame.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 50 350 2 90 200 0 155 155 155 155 2;es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es_xmath wcs_z1 + 15;es est_effect 11 #a 0 sprites/flatflame.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 3 3 255;es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xif (server_var(wcs_dice) <= 15) then es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es es_xif (server_var(wcs_dice) <= 15) then es_xif (server_var(wcs_alive) = 1) then est_Effect 3 #a 0 sprites/flatflame.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 100 255 55 255" "skill3_setting" "es_xsetinfo wcs_chance 28|es_xsetinfo wcs_chance 33|es_xsetinfo wcs_chance 30|es_xsetinfo wcs_chance 45|es_xsetinfo wcs_chance 50" "skill3_cmd" "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es es_xif (server_var(wcs_dice) <= 10) then est_isalive wcs_alive event_var(userid);est_spawn event_var(userid);es es_xif (server_var(wcs_dice) <= 10) then est_teleport event_var(userid) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2);es es_xif (server_var(wcs_dice) <= 10) then es_xtell event_var(userid) : Teleport Attack ." "skill3_sfx" "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es_xmath wcs_z1 + 20;es_xmath wcs_z2 + 20;es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then est_Effect 3 #a 0 sprites/tp_beam001.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 2 5 255 151 67 255" "skill4_setting" "es_xsetinfo wcs_chance 28|es_xsetinfo wcs_chance 33|es_xsetinfo wcs_chance 30|es_xsetinfo wcs_chance 45|es_xsetinfo wcs_chance 50" "skill4_cmd" "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_userid);es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then est_isalive wcs_alive server_var(wcs_userid);es est_teleport server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1);es es_xtell server_var(wcs_userid) : teleported." "skill4_sfx" "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_userid);es_xmath wcs_z1 + 20;es_xmath wcs_z2 + 20;es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then est_Effect 3 #a 0 sprites/tp_beam001.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 2 5 255 151 67 255" "ultimate_cooldown" "25" }
|
|
|
|
|
Logged
|
|
|
|
|
[Oddity]TeacherCreature
|
 |
« Reply #43 on: July 12, 2007, 04:14:07 AM » |
|
I got this working fine but I noticed some weapons this happened on office with skill1 would teleport players into the ceiling. JUST FYI great race though
|
|
|
|
|
Logged
|
|
|
|
Hawkeye9797
Level 0 Beginner
Offline
Posts: 12
|
 |
« Reply #44 on: July 12, 2007, 05:36:23 AM » |
|
so is this the final version, working with no errors?
|
|
|
|
|
Logged
|
|
|
|
|