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 2011-09-18 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: [Tutorial] Using es_xmath/es_math on your effects.  (Read 611 times)

Offline Vipper

  • Level 3 Trained Apprentice
  • ***
  • Posts: 64
  • Country:
  • Hot Brazilian Surfer
[Tutorial] Using es_xmath/es_math on your effects.
« on: March 21, 2011, 05:51:00 PM »
Hello, firstly I'd like to apologize for my bad english :P but im trying to do my best to this tutorial be understandable.

Well, in this tutorial, i'll be teaching you how to use es_xmath on your effects.

But, to do this, you need to have complete knowledge of basic (or advanced) effects making, in the tutorial made by AvasT. You will find this tutorial right here, on the Tutorials Section.
 -------------------------------------------

So, let's start
But Vipper, what is es_math ?
es_math (or es_xmath) is a command that modify the "position" in which the effect is displayed. For example, if you want the effect to go a little bit forward, you use the es_math on a coordinate, if you want it to go a little bit to the left, you use it in another coordinate. I'll explain it better down here..
The difference between es_math and es_xmath, is that es_xmath do not expand variables.

As you know, there are the coords:
X, Y and Z and everyone of those coords have a "direction"

The X Coord goes Left and Right
The Y Coord goes Forward and Backward
The Z Coord goes Up and Down

The es_math on the effects, adds values to those coords, Modifying the effects possition.

E.g.
Code: [Select]
es_xmath wcs_x1 + 20This one, is adding 20 Units of measurement of the game to the X coord, forcing it to go to the right

Code: [Select]
es_xmath wcs_x1 - 20Same thing from above, but it is forcing the effect to go to the Left

Code: [Select]
es_xmath wcs_y1 + 30This one is adding 30 units of measurement of the game to the Y coord, forcing it to go Forward

Code: [Select]
es_xmath wcs_y1 - 30Same thing from above, but it is forcing the effect to go Backward

Code: [Select]
es_xmath wcs_z1 + 10This one is adding 10 units of measurement of the game to the Z coord, forcing the effect to go UP

Code: [Select]
es_xmath wcs_z1 - 10Same thing from above, but is forcing the effect to go Down

Remember that you need get the player's location before using the es_math/es_xmath

Example of a effect using es_math
Code: [Select]
es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es_xmath wcs_y1 + 60;es_xmath wcs_x1 - 20;es est_effect 10 #a 0 sprites/flatflame.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 50 450 4 9 120 5 255 144 0 255 1(Beam Ring)

Note: This beam ring will go 60 units of measurement forward and 20 to the Left.
          In other words, it goes a little further ahead and to the left.

Note²:Remember that ; will separate the commands.

I think that's it.
Thank you for reading, any questions you might have, fell free to ask.
Bye :)




« Last Edit: April 27, 2011, 05:44:07 PM by Vipper »
shitting races forever (:


Offline xIceKiller

  • Level 7 Expert
  • *****
  • Posts: 919
  • Country: ge
  • New Age!
    • Ice server
Re: [TUTORIAL] Using es_xmath/es_math on your effects.
« Reply #1 on: March 21, 2011, 06:14:53 PM »
Vipper  Good tutorial for starter :)

Offline Vipper

  • Level 3 Trained Apprentice
  • ***
  • Posts: 64
  • Country:
  • Hot Brazilian Surfer
Re: [TUTORIAL] Using es_xmath/es_math on your effects.
« Reply #2 on: March 23, 2011, 04:46:14 PM »
Thank you man! :)
shitting races forever (:

Muse

  • Guest
Re: [TUTORIAL] Using es_xmath/es_math on your effects.
« Reply #3 on: March 24, 2011, 07:53:49 AM »
awesome

Offline Jukeb0xi

  • Level 7 Expert
  • *****
  • Posts: 153
  • Country:
  • need help on effects
Re: [TUTORIAL] Using es_xmath/es_math on your effects.
« Reply #4 on: April 24, 2011, 07:52:16 AM »
My es_xmath doesn't work i wan't 2 rings 100 Front and 50 left and other 50 right =D But Comes to console The var "y1" could not be found
The var "x1" could not be found So Do i need download something Addon block or else Or do i something wrong
If you need help add the_nakkimakkara on steam

But not on every effect



















Add the_nakkimakkara
Or send me email to [email protected]

Offline Kamiqawa

  • Moderator
  • Level 7 Expert
  • Posts: 415
  • Country:
Re: [TUTORIAL] Using es_xmath/es_math on your effects.
« Reply #5 on: April 24, 2011, 03:05:43 PM »
Hmm, yes, the tutorial seems to have one mistake in it.. ::)

Code: [Select]
es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es_xmath y1 + 60;es_xmath x1 - 20;es est_effect 10 #a 0 sprites/flatflame.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 50 450 4 9 120 5 255 144 0 255 1
The code above causes your errors, T.E.A.M K.I.L.L.E.R. It should be:

Code: [Select]
es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es_xmath wcs_y1 + 60;es_xmath wcs_x1 - 20;es est_effect 10 #a 0 sprites/flatflame.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 50 450 4 9 120 5 255 144 0 255 1
Or something like that. You should prolly update your tutorial, it seems to cause some misunderstandings to some people ;)
 
Quote from: $Diablo$
You are banana dabass... Kami tried to proof point here and you ruin it >.>



Click here for wcs content made by me.


Offline Vipper

  • Level 3 Trained Apprentice
  • ***
  • Posts: 64
  • Country:
  • Hot Brazilian Surfer
Re: [TUTORIAL] Using es_xmath/es_math on your effects.
« Reply #6 on: April 26, 2011, 01:36:41 PM »
Oh, sorry everyone..
I had not  seen that...

ty Kamiqawa and La Muerte for fixing it.

shitting races forever (:


 


Powered by EzPortal