wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > Tutorials for beginners
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 10-24-2004, 06:34 AM   #1
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default Offset / Polar Offset

Offset is measuring a location based on another location.

In Warcraft 3, all objects on the map have X and Y coordinates. (X being left to right, with Y being up to down at the default camera angle) In most cases, point 0,0 (X,Y) is around the center of the playable map area. In the world editor, you can see which point your cursor is pointing at in the bottom left corner. You will see “Point: (number, number, number)” when you move your mouse around your map. These are your cursors X, Y, and Z coordinates. (Z being how high something is, like a unit's flying height)

The world editor has 3 sizes of grid you can toggle between with the G key. Each one is a power of 2 high and wide. Lets list the exact values:

Small: 32
Medium: 128, or 4 Small
Large: 512, or 4 Medium, or 16 Small

Now, if you are wondering “How does that help me, Mr. Fury?” then let me tell you! Lets say you want a unit to move in the direction he is facing.
Trigger:
Unit - Order (Your unit) to Move To ((Position of (Your unit)) offset by 32.00 towards (Facing of (Your unit)) degrees)
This is called polar offset, which is offsetting something by some distance in some direction. You have your unit, and he is facing a direction. You want to order him to move a distance of 32 in that direction. So, you take the point at which your unit is standing, (A point is an X and a Y coordinate all in one) and you offset it in the direction he is facing by a distance of 32. Very simple.

Now lets say you want to make him move diagonally up and right by 128.
Trigger:
Unit - Order (Your unit) to Move To ((Position of (Your unit)) offset by (128..00, 128..00))
This takes the point of your unit, offsets it by 128 along both the X and Y axis, and orders him to move there. Even simpler!

Now, the problem with this is memory leaks. That is beyond the scope of this tutorial, but let it be noted that using allot of points will cause allot of memory leaks.

Edited because: I've actually spell checked and mostly re-written this tutorial. Boy, posted in '04... My spelling, and hopefully my language skills as a whole, have vastly improved....
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils


Last edited by Earth-Fury : 03-15-2007 at 02:29 PM. Reason: I've actually spell checked and mostly re-written this tutorial. Boy, posted in '04... My spelling, and hopefully my language skills as a whole, have vastly improved...
Earth-Fury is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-24-2004, 04:42 PM   #2
dhv
User
 
Join Date: Aug 2004
Posts: 8

dhv has little to show at this moment (0)

Default

Good tutorial... Made my understanding of offsets clearer.
dhv is offline   Reply With Quote
Old 10-30-2004, 09:00 AM   #3
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

thx :P its an older tutorial, but nothing has chanced in this area. (and i couldent see it ever chaing dramatically 0.0)
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 02-10-2006, 02:18 PM   #4
Ragnarok X
User
 
Join Date: Dec 2003
Posts: 83

Ragnarok X has little to show at this moment (5)

Default

The values of the 3 sizes of grid are:
Small grid: 32
Medium grid: 128
Large grid: 512

Anyway, good tutorial for people that don't know this.
Ragnarok X is offline   Reply With Quote
Old 02-14-2006, 08:38 PM   #5
Meanie
User
 
Join Date: Dec 2005
Posts: 152

Meanie is on a distinguished road (13)

Default

Thanks alot i have been trying to read decades long tutorials to find this information again THANKS ALOT ♥♥♥
Meanie is offline   Reply With Quote
Old 02-16-2006, 01:36 AM   #6
Miranox
User
 
Miranox's Avatar
 
Join Date: Dec 2005
Posts: 12

Miranox has a little shameless behaviour in the past (-3)

Default

The grid values I didn't know very well, but the rest you can learn at school :P
Miranox is offline   Reply With Quote
Old 05-11-2006, 05:38 PM   #7
Xios
User
 
Xios's Avatar
 
Join Date: May 2006
Posts: 85

Submissions (4)

Xios will become famous soon enough (27)

Default

yeah thanks, before i was using x=1,y=1.... lol but know i know its x=30 and y=30 thanks alot, this is usefull for flooding an areain my smoke from smoke grenade
Xios is offline   Reply With Quote
Old 10-15-2006, 05:39 PM   #8
alzidaney
User
 
alzidaney's Avatar
 
Join Date: Jul 2006
Posts: 5

alzidaney has little to show at this moment (0)

Default

Quote:
Small grid: 32
Medium grid: 128
Large grid: 512

Quote:
Small - (30 Value)
Medium - 4 smalls in a medium (120 Value)
Large - 4 medium, or 16 small in one large (480 value)

So which one is the right one?
__________________
alzidaney is offline   Reply With Quote
Old 09-10-2009, 03:37 PM   #9
lukesmith
User
 
lukesmith's Avatar
 
Join Date: Sep 2009
Posts: 2

lukesmith has little to show at this moment (0)

Send a message via Yahoo to lukesmith
Default

wow nice tutorial , all i know is just making a + pattern using offset hehe
lukesmith is offline   Reply With Quote
Old 09-23-2009, 02:13 AM   #10
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

Quote:
Originally Posted by alzidaney
So which one is the right one?

It's always power of 2.
ToukoAozaki is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:09 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services