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 > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-22-2015, 01:50 PM   #1
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default how can i make a unit change into another unit when it stops moving

in one my projects i have a basic unit that transforms between basal golem(when moving) and obelisk(when not moving). i have already figured out how to make it transform from obelisk to basal golem when it moves but the issue is to make it transform into obelisk when it stops. how can i do that?
andreasaspenberg is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-23-2015, 01:33 AM   #2
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

That depends on your definition of "moving". Do you mean when a unit is issued a stop/hold position command and when it reaches its destination from move/attack commands? Or do you simply mean when it is standing still?

Also: how are you doing the obelisk to golem transformation?

Last edited by Fledermaus : 04-23-2015 at 02:30 AM.
Fledermaus is offline   Reply With Quote
Old 04-23-2015, 02:38 PM   #3
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

when it is given a move or attack order it changes from obelisk til basal golem. i want it to change back into obelisk when it does nothing.
andreasaspenberg is offline   Reply With Quote
Old 04-24-2015, 02:07 AM   #4
yeeboys
User
 
Join Date: Oct 2013
Posts: 19

yeeboys has little to show at this moment (0)

Default

Quote:
Originally Posted by andreasaspenberg
when it is given a move or attack order it changes from obelisk til basal golem. i want it to change back into obelisk when it does nothing.
create a new unit and hide the old one and vice versa.

Last edited by yeeboys : 04-24-2015 at 02:08 AM.
yeeboys is offline   Reply With Quote
Old 04-24-2015, 12:54 PM   #5
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

Quote:
Originally Posted by andreasaspenberg
when it is given a move or attack order it changes from obelisk til basal golem. i want it to change back into obelisk when it does nothing.
That wont work 100%. If the obelisk has any other abilities, issuing those could cause it to move to the target and wont trigger the change.
There is also the problem that if a unit is standing still (i.e. after it has finished moving/attack moving to a location, or after a stop (or hold position if it's ranged) order) and it auto-acquires a new target to attack, it will attack the target but it will not fire any order. So your current system will not catch when this happens and wont transform from obelisk to golem.

I would do it by running a timer and keeping track of all obelisk/golem's x/y previous position.
When the timer runs, check their current x/y.
If the unit is a golem and the current x/y is not different from the previous x/y then it has stopped moving so transform it into the obelisk.
If the unit is an obelisk and it's current x/y is different from the previous x/y then it has started moving so transform it into the golem.
Update the previous x/y to the current x/y.

How are you doing the actual transformation, chaos morp or replace unit?

Last edited by Fledermaus : 04-24-2015 at 11:58 PM.
Fledermaus is offline   Reply With Quote
Old 04-30-2015, 01:34 PM   #6
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

i am using chaos as that is smoother. i have been working on a variant of bear form to transform the unit so it just needs to trigger bear form when it stops moving and when starts moving.

Last edited by andreasaspenberg : 04-30-2015 at 07:11 PM.
andreasaspenberg is offline   Reply With Quote
Old 05-01-2015, 04:36 AM   #7
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

So which one do you want to use?
Fledermaus is offline   Reply With Quote
Old 05-01-2015, 12:43 PM   #8
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

bear form would be the best for what i want though when i have perfected the system i want to hide it so that it becomes invisible.
andreasaspenberg is offline   Reply With Quote
Old 05-04-2015, 12:18 PM   #9
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

It was too annoying with Bear Form so I made it using chaos instead.

Steps for copying it to your map:
  • Open my map.
  • Select the custom code section (red) - copy everything in the blue section.
  • Open your map and paste into the custom code section (blue).
  • Create the following variables:
    • Boolean array - CanYouMoveWhenBlizzardSuesYou
    • Timer - SuingAssassinTimer
    • Integer - TheCountForThirdPartyApps (Initial value 0)
    • Real array - TheXPositionWhenBlizzardKillsU
    • Real array - TheYPositionWhenBlizzardSuesU
    • Unit array - WhichUnitShallBlizzardSueNext
  • Create the chaos morph abilities
  • Go through the custom code, look for the 3 comments all in caps and follow the instructions
  • Look at the "Trigger For Registering Units" and "Trigger For Unregistering Units" triggers and try to create something similar in your map.
  • Please don't sue or have me assassinated for using jass :c
  • Complain that it is unusable because it is in jass.
  • Complain that it is unusable because of some reason you are only giving now after I have created everything that you asked for.
Attached Images
File Type: png Instructions for a Noob.png (86.1 KB, 24 views)
Attached Files
File Type: w3x PLZ NO SUE.w3x (15.7 KB, 15 views)

Last edited by Fledermaus : 05-04-2015 at 12:19 PM.
Fledermaus is offline   Reply With Quote
Old 05-04-2015, 01:35 PM   #10
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

that file would not open in the world editor. there several types of jass: one is typed in without the use of a third party program and therefore legal, others are typed in through the use of a third party program and therefore illegal. what type did you use? please give me what i asked for instead of what you want me to use.

Last edited by andreasaspenberg : 05-04-2015 at 03:19 PM.
andreasaspenberg is offline   Reply With Quote
Old 05-04-2015, 10:05 PM   #11
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

That was saved in the vanilla world editor on the latest patch. If you can't open it you must be using a third party editor that can't open normal maps.
Since you have now openly admitted you use a third party editor you probably should go into hiding before blizzard sends someone to kill you.

Last edited by Fledermaus : 05-04-2015 at 11:02 PM.
Fledermaus is offline   Reply With Quote
Old 05-04-2015, 10:17 PM   #12
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

Quote:
Originally Posted by andreasaspenberg
there several types of jass: one is typed in without the use of a third party program and therefore legal, others are typed in through the use of a third party program and therefore illegal
Actually by that logic all of the code you have gotten from us on this site is doubly illegal (even the gui). It was first written in a third party editor, and then copied into your map from a third party website (this isn't the official blizzard site).

You might be in serious danger already.

Last edited by Fledermaus : 05-04-2015 at 10:17 PM.
Fledermaus is offline   Reply With Quote
Old 05-05-2015, 12:46 AM   #13
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

blizzard have said nothing about third party sites or third party code, only third party programs and that i do not use. please stop trolling me. any more trolling from you will be ignored.
andreasaspenberg is offline   Reply With Quote
Old 05-05-2015, 01:28 AM   #14
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

I am being serious. That map was saved with blizzards world editor on the latest patch.
You must have done something if you cannot open it.

It is exactly what you asked for (well, it uses chaos but that's a better way to do it anyway) and yet you still somehow find a reason to not be able to use it... Please stop trolling me.

Quote:
Originally Posted by andreasaspenberg
blizzard have said nothing about third party sites or third party code, only third party programs and that i do not use.
Quote:
Originally Posted by andreasaspenberg
there several types of jass: one is typed in without the use of a third party program and therefore legal, others are typed in through the use of a third party program and therefore illegal.
These two statements contradict each other. How can you think that jass written with a third party application is illegal and yet it is legal to use third party code (possibly written in a third party application - therefor making it illegal)?
Again, please stop trolling me.

Last edited by Fledermaus : 05-05-2015 at 01:44 AM.
Fledermaus is offline   Reply With Quote
Old 05-05-2015, 09:07 AM   #15
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

Isn't this the point where you just make a custom model that has one unit in its stand animation and another in its walk animation?
__________________
Rao Dao Zao 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 02:27 AM.


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