Current Topic Rating:    
|
You have not rated this topic. Select a rating:
|
|
Author |
Topic: Blink (the real blink) help (Read 144 times)
|
|
Bob
|
 |
« on: November 10, 2009, 08:20:40 PM » |
|
Zawmbie please help me, I have been working on this forever. I just want to know how to make a blink skill but it only going a certan distance. Zawmbie, No-life, Beret, someone help please 
|
|
|
|
|
Logged
|
|
|
|
|
<---TexNo--->
|
 |
« Reply #1 on: November 10, 2009, 08:22:52 PM » |
|
what you mean with a blink skill ?...
|
|
|
|
|
Logged
|
Want a private race or a private race pack, buy from me. 
|
|
|
|
AvasT
|
 |
« Reply #2 on: November 10, 2009, 08:25:08 PM » |
|
i think he wants blind? or blinking invis?
|
|
|
|
|
Logged
|
Lol?
|
|
|
Doblez
Level 0 Beginner
Offline
 Denmark
Posts: 15
I only play wcs! Its the only fun
dnal1701myServer 72.249.10.141:27015(Warning: click connects through Steam)
|
 |
« Reply #3 on: November 10, 2009, 08:30:09 PM » |
|
I think he mean the "blink skill" from WOW mage a skill like that would also be AWSOME!  Am i right in my thoughts Bob?
|
|
|
|
|
Logged
|
Just contact me if u have some questions about making race.  Im not on the same level as the semi-pro/pro race makers! But i can anyway help. 
|
|
|
|
AvasT
|
 |
« Reply #4 on: November 10, 2009, 08:38:15 PM » |
|
explain what it does
|
|
|
|
|
Logged
|
Lol?
|
|
|
|
Bob
|
 |
« Reply #5 on: November 10, 2009, 08:44:10 PM » |
|
it is like a short teleport, im saying if you look at a wall far away you dont teleport to the wall but like 100 feet. or if your closer then 100 feet you go to whatever your looking at.
|
|
|
|
|
Logged
|
|
|
|
|
[Oddity]TeacherCreature
|
 |
« Reply #6 on: November 11, 2009, 05:51:11 PM » |
|
use pushto with some invisibility so it seems like blink?
Like human teleport but the character goes invisible for 1 second ?
|
|
|
|
|
Logged
|
|
|
|
|
Yiyas
|
 |
« Reply #7 on: November 11, 2009, 06:31:00 PM » |
|
Use trigonometry.
|
|
|
|
|
Logged
|
|
|
|
|
Zawmbee
|
 |
« Reply #8 on: November 11, 2009, 07:35:56 PM » |
|
The main thing with this is that you need to be very good with math. Like a graph, you need to find the coordinates over and over again and check them. Since there will be two variables at times, you need to find a way to change the variables to make the correct choice. The best I could do for you at the moment is make an ability that teleports you a percentage of the distance in between the view coords and the location you are standing...
|
|
|
|
|
Logged
|
(Anyone who C&P's my races, give credit, TY)
|
|
|
Cannon-Fodder
Level 2 Apprentice

Offline
 United States
Posts: 41
Skittles, rainbow, skittles, rainbow... @_@
|
 |
« Reply #9 on: November 11, 2009, 08:51:45 PM » |
|
Buh... It looks good to me... o.o Maybe you need to Float the variables before the math?
Edit: Post I was looking at for the response went POOF. x_x
|
|
|
|
|
Logged
|
<3 Remember kids, never drink and code.
|
|
|
|
CA.Berettonawak
|
 |
« Reply #10 on: November 11, 2009, 10:20:55 PM » |
|
import playerlib import es
def teleport(): player = playerlib.getPlayer(es.server_var["wcs_userid"]) multi = int(es.server_var["wcs_distance"]) / 100 vector = player.viewVector() es.setpos(player.userid, (vector[0] - player.x) * multi, (vector[1] - player.y) * multi, (vector[2] - player.z) * multi)
|
|
|
|
|
Logged
|
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good. i love tuna juice  =CA= Pietro: back =CA= Pietro: sorry, was downstair sharing my chocolate with my cat =CA= Pietro: you should see his face when he ate it xD =CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
|
|
|
|
Yiyas
|
 |
« Reply #11 on: November 11, 2009, 11:01:05 PM » |
|
Have a bash with this, it's fun regardless:: Probs least exploitable of what's been suggested beforehand Shouldn't teleport into walls unless at steep angles ~<20 to the wall and in line with it If a player aims beyond the distance then they will simply fall short of the teleport. block wcs_blink { // WC3 Skill Conversion "Blink" by Yiyas es_xset x 0;es_xset y 0;es_xset z 0;es_xset x1 0;es_xset y1 0;es_xset z1 0;es_xset x2 0;es_xset y2 0;es_xset z2 0;es_xset anglevert 0
es_getplayerlocation x1 y1 z1 server_var(wcs_userid) es est_GetViewCoord server_var(wcs_userid) x2 y2 z2
es_xmathparse x "x2-x1" es_xmathparse y "y2-y1" es_xmathparse z "z2-z1" es_xmathparse anglevert "atan(z/((x^2+y^2)^0.5))" // Make sure angle isn't too high so they cant teleport above world boundaries ifx parse("anglevert < 0.33") do { // Get the distance of the teleport es_xset distance 0 es_xmathparse distance "(x^2+y^2+z^2)^0.5" ifx parse("maxdist < 175") do { es_xset maxdist 175 } // Is the distance too big? ifx parse("distance > maxdist") do { es_xcopy distance maxdist } // Cut some off so you aren't teleporting in walls es_xmath distance - 50 // Make sure the teleport is actually worthwhile ifx parse("distance > 100") do { es_xset x3 0;es_xset y3 0;es_xset z3 0;es_xset anglehoriz 0;es_xset coords 0;es_xset newcooldown 0 es_xmathparse newcooldown "(maxdist - distance)/maxdist*cooldown" es_xmathparse anglehoriz "atan(y/x)" // Calculate the new co-ords ifx true(y) do { es_xmathparse y3 "sin(anglehoriz)*distance*cos(anglevert)" es_xmath y3 abs es_xmath y3 * 1 ifx parse("(y > -30) and (y < 30)") do { } ifx parse("y < 0") do { es_xmath y3 * -1 } } ifx true(x) do { es_xmathparse x3 "cos(anglehoriz)*distance*cos(anglevert)" es_xmath x3 abs es_xmath x3 * 1 ifx parse("(x > -30) and (x < 30)") do { } ifx parse("x < 0") do { es_xmath x3 * -1 } } ifx true(z) do { es_xmathparse z3 "distance*sin(anglevert)" es_xmath z3 abs ifx parse("z < 0") do { es_xmath z3 * -1 } } es_xmathparse x "x1+x3" es_xmathparse y "y1+y3" es_xmathparse z "z1+z3+10" es_xformatv coords "%1,%2,%3" x y z ifx true(coords) do { //es_setplayerprop server_var(wcs_userid) CBaseEntity.m_vecOrigin server_var(coords) es_xmath z1 + 20 es est_effect 10 #a 0 dev/ocean.vmt server_var(x1) server_var(y1) server_var(z1) 200 20 0.5 10 5 0 255 100 100 255 20 es est_god server_var(wcs_userid) 1 es est_Fade server_var(wcs_userid) 0 0.001 0.25 0 0 0 255 es est_freeze server_var(wcs_userid) 1 es est_teleport server_var(wcs_userid) server_var(x) server_var(y) -10000 es_delayed 0.25 est_freeze server_var(wcs_userid) 0 es_delayed 0.4 est_god server_var(wcs_userid) 0 es_delayed 0.25 est_teleport server_var(wcs_userid) server_var(x) server_var(y) server_var(z) es_xmath z + 20 es_delayed 0.1 est_effect 10 #a 0 dev/ocean.vmt server_var(x) server_var(y) server_var(z) 20 200 1.25 10 5 0 255 100 100 255 10 // put your effects in here } } // Was too close :( es_xelse do { es_tell server_var(wcs_userid) #multi #greenToo Close!!#lightgreen try #greenBlinking#lightgreen #greenfurther#lightgreen away! es_xset wcs_ultinotexec 1 } } // Was too high :( es_xelse do { es_tell server_var(wcs_userid) #multi #greenToo High!!#lightgreen try #greenBlinking#lightgreen a #greenshallower#lightgreen angle! es_xset wcs_ultinotexec 1 } }
|
|
|
|
« Last Edit: November 12, 2009, 12:18:12 AM by Yiyas »
|
Logged
|
|
|
|
|
Zawmbee
|
 |
« Reply #12 on: November 11, 2009, 11:40:31 PM » |
|
Removed maxdist from coding and set it in setting, this allows the ability to have a point for being leveled up. "skill1_setting" "es_xset maxdist 200|es_xset maxdist 250|es_xset maxdist 300|es_xset maxdist 350|es_xset maxdist 400|es_xset maxdist 450|es_xset maxdist 500|es_xset maxdist 550" "skill1_cmd" "es_xdoblock wcs/WCSultimates/wcs_blink" "skill1_sfx" "0" "ultimate_cooldown" "0" block wcs_blink { // WC3 Skill Conversion "Blink" by Yiyas es_xset x 0;es_xset y 0;es_xset z 0;es_xset x1 0;es_xset y1 0;es_xset z1 0;es_xset x2 0;es_xset y2 0;es_xset z2 0;es_xset anglevert 0
es_getplayerlocation x1 y1 z1 server_var(wcs_userid) es est_GetViewCoord server_var(wcs_userid) x2 y2 z2
es_xmathparse x "x2-x1" es_xmathparse y "y2-y1" es_xmathparse z "z2-z1" es_xmathparse anglevert "atan(z/((x^2+y^2)^0.5))" // Make sure angle isn't too high so they cant teleport above world boundaries ifx parse("anglevert < 0.33") do { // Get the distance of the teleport es_xset distance 0 es_xmathparse distance "(x^2+y^2+z^2)^0.5" // Is the distance too big? ifx parse("distance > maxdist") do { es_xcopy distance maxdist } // Cut some off so you aren't teleporting in walls es_xmath distance - 50 // Make sure the teleport is actually worthwhile ifx parse("distance > 100") do { es_xset x3 0;es_xset y3 0;es_xset z3 0;es_xset anglehoriz 0;es_xset coords 0;es_xset cooldown 0 es_xcopy cooldown maxdist es_xmathparse cooldown "(cooldown - distance)/500*10" es_xmathparse anglehoriz "atan(y/x)" // Calculate the new co-ords ifx true(y) do { es_xmathparse y3 "sin(anglehoriz)*distance*cos(anglevert)" es_xmath y3 abs es_xmath y3 * 1 ifx parse("(y > -30) and (y < 30)") do { } ifx parse("y < 0") do { es_xmath y3 * -1 } } ifx true(x) do { es_xmathparse x3 "cos(anglehoriz)*distance*cos(anglevert)" es_xmath x3 abs es_xmath x3 * 1 ifx parse("(x > -30) and (x < 30)") do { } ifx parse("x < 0") do { es_xmath x3 * -1 } } ifx true(z) do { es_xmathparse z3 "distance*sin(anglevert)" es_xmath z3 abs ifx parse("z < 0") do { es_xmath z3 * -1 } } es_xmathparse x "x1+x3" es_xmathparse y "y1+y3" es_xmathparse z "z1+z3+10" es_xformatv coords "%1,%2,%3" x y z ifx true(coords) do { //es_setplayerprop server_var(wcs_userid) CBaseEntity.m_vecOrigin server_var(coords) es est_teleport server_var(wcs_userid) server_var(x) server_var(y) server_var(z) // put your effects in here } } // Was too close :( es_xelse do { es_tell server_var(wcs_userid) #multi #greenToo Close!!#lightgreen try #greenBlinking#lightgreen #greenfurther#lightgreen away! es_xset wcs_ultinotexec 1 } } // Was too high :( es_xelse do { es_tell server_var(wcs_userid) #multi #greenToo High!!#lightgreen try #greenBlinking#lightgreen a #greenshallower#lightgreen angle! es_xset wcs_ultinotexec 1 } } *EDIT* Hope you did not mind the modification Yiyas, you did a great job by the way. Definitely beat me to the punch 
|
|
|
|
|
Logged
|
(Anyone who C&P's my races, give credit, TY)
|
|
|
|
Yiyas
|
 |
« Reply #13 on: November 12, 2009, 12:04:27 AM » |
|
Lulz I did that just now  Added in effects and person dissapears for 0.25s like they do in the real WC3. If someone could get the sounds for Warden's Blink that'd be awesome and just perfect it. Also note that the cooldown stuff is probably throw-away-able as it requires a bit more editing than most people could cope with, just means if you make a short jump it costs less in terms of cooldown.
|
|
|
|
« Last Edit: November 12, 2009, 12:06:42 AM by Yiyas »
|
Logged
|
|
|
|
Cannon-Fodder
Level 2 Apprentice

Offline
 United States
Posts: 41
Skittles, rainbow, skittles, rainbow... @_@
|
 |
« Reply #14 on: November 12, 2009, 08:11:14 AM » |
|
Way to go, Yiyas, you made my head hurt with all that math. :p
Guess it serves me right for leaving my trig-calc book at my old house. XD
|
|
|
|
|
Logged
|
<3 Remember kids, never drink and code.
|
|
|
|
|
|