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-11-16 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
November 16, 2009, 02:10:25 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Please obey the rules, to achieve a pleasent order in our community.
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1] 2   Go Down
  Print  
Current Topic Rating: ***** You have not rated this topic. Select a rating:
Author Topic: Blink (the real blink) help  (Read 144 times)
Bob
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 212



« 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 Cheesy
Logged
<---TexNo--->
Level 7 Expert
*****
Offline Offline

Norway

Posts: 733


< Need Help ? >


WWW
texno755 or nichosv
gameren755

myServer 83.142.49.95:28015
(Warning: click connects through Steam)
« 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
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 482




doug_tiozao
« 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 Offline

Denmark Denmark

Posts: 15


I only play wcs! Its the only fun



dnal1701

myServer 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! Grin Am i right in my thoughts Bob?
Logged

Just contact me if u have some questions about making race. Grin Im not on the same level as the semi-pro/pro race makers! But i can anyway help. Smiley
AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 482




doug_tiozao
« Reply #4 on: November 10, 2009, 08:38:15 PM »

explain what it does
Logged

Lol?
Bob
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 212



« 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
Moderator
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 1358



WWW
bonggged

myServer 72.5.102.44:27015
(Warning: click connects through Steam)
« 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
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 197


The name's Bugger. De-Bugger.



no1yiyas
no1yiyas
« Reply #7 on: November 11, 2009, 06:31:00 PM »

Use trigonometry.
Logged

Zawmbee
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 696


Watch Tower


« 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 Offline

United States 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

CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2703


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #10 on: November 11, 2009, 10:20:55 PM »

Code:
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

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=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
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
Yiyas
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 197


The name's Bugger. De-Bugger.



no1yiyas
no1yiyas
« 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.

Code:
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
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 696


Watch Tower


« 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.

Code:
   "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"

Code:
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 Cheesy
Logged


(Anyone who C&P's my races, give credit, TY)
Yiyas
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 197


The name's Bugger. De-Bugger.



no1yiyas
no1yiyas
« Reply #13 on: November 12, 2009, 12:04:27 AM »

Lulz I did that just now Tongue

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 Offline

United States 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

Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
November 15, 2009, 12:28:03 PM
Chat command "!menu"
bind x admin2
November 15, 2009, 10:35:05 AM
what is the "key" for superadmin menu?
November 15, 2009, 10:09:31 AM
have you ever go to google and type game server host?
November 15, 2009, 01:14:20 AM
ukgame.com
November 15, 2009, 12:55:04 AM
where hell i can create server
November 14, 2009, 11:14:54 PM
xD
November 14, 2009, 08:48:28 PM
It's how many posts you make, 20 posts = level 1...
20 more level 2
and on, but there are posts diffrence high up,
Recent
[Today at 01:37:31 AM]

[Today at 12:50:43 AM]

[Today at 12:47:14 AM]

[Today at 12:06:05 AM]

[November 15, 2009, 11:57:08 PM]

[November 15, 2009, 10:49:40 PM]

[November 15, 2009, 09:25:36 PM]

[November 15, 2009, 09:23:55 PM]

[November 15, 2009, 08:40:53 PM]

[November 15, 2009, 08:13:41 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.105 seconds with 22 queries.