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 08-10-2009, 10:46 PM   #1
thehellman
User
 
Join Date: Jan 2006
Posts: 158

Submissions (2)

thehellman has little to show at this moment (4)

Default Casting-Time Spells Insist On Following

A have a dummy spell off of Channel and it has a 2 second casting time. The problem is, if the target goes out of range before the 2 second casting time is over, the caster will run towards the target, which I don't want.

Instead I want it after the 2 seconds, if the target is out of range or has gone into fog of war, the spell simply fails.
thehellman is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-13-2009, 01:28 PM   #2
Summoner
User
 
Join Date: Jul 2009
Posts: 27

Summoner has little to show at this moment (4)

Default

Is target a enemy or firend?
I didn't meet the problem when I try it.
Maybe you can use trigger to prevent it.
You should turn on a trigger when casting
Trigger:
Collapse Events
Unit - A unit leaves (Region centered at (Position of <caster>) with size (<width>, <height>))
Collapse Conditions
(Triggering unit) Equal to <target unit of ability being cast>
Collapse Actions
Unit - Order <caster> to Stop
You also should set target unit of ability being cast to a variable in the Channel effect trigger.

Last edited by Summoner : 08-13-2009 at 01:29 PM.
Summoner is offline   Reply With Quote
Old 08-13-2009, 02:45 PM   #3
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

That trigger won't work, since the "region centered on position of caster" will be run only once, when the map starts.

Have you considered using a channeling spell instead of casting time, and doing whatever effect you want when the spell finishes?
__________________
Anitarf is offline   Reply With Quote
Old 08-14-2009, 03:20 PM   #4
Summoner
User
 
Join Date: Jul 2009
Posts: 27

Summoner has little to show at this moment (4)

Default

Why? The position of caster will change when the game operating. It's true that I didn't try the trigger because I didn't meet the problem when I made a spell based on Channel as you said. It's only a trigger in theory.
Summoner is offline   Reply With Quote
Old 08-14-2009, 03:28 PM   #5
Tot
6
 
Tot's Avatar
 
Join Date: Oct 2008
Posts: 841

Tot will become famous soon enough (53)Tot will become famous soon enough (53)

Default

why not chencking the distance between target and caster?
Expand JASS:
__________________
Current Projects:
  • Masters Of WarCraft: Some mixture of AoS and RPG
    Terrain: 100%, Coding: 75%, Heroes: 0%, Items: 0%, Creeps: 0%, Upgrades: 0%
  • hunting emos
____________________________________
scheiss kack dreck sausacksau bundeswehr
Tot is offline   Reply With Quote
Old 08-14-2009, 04:06 PM   #6
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

Quote:
Originally Posted by Summoner
Why? The position of caster will change when the game operating. It's true that I didn't try the trigger because I didn't meet the problem when I made a spell based on Channel as you said. It's only a trigger in theory.

In your example, you create a rect centred at the position of a unit, then register that rect to an event. The rect does not move with the unit. it is simply created at it's position.

GUI sucks when dealing with regions and rects.
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 08-15-2009, 09:44 AM   #7
Summoner
User
 
Join Date: Jul 2009
Posts: 27

Summoner has little to show at this moment (4)

Default

Well, well. That means if I want to make a aura spell with trigger, I will need to use other ways?
Summoner is offline   Reply With Quote
Old 08-15-2009, 03:30 PM   #8
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

thehellman, is there any way you could put up your map *or* put up a demo map with your unit and spell placed in it? I don't recall running into your problem, and it would help to see what you're actually working with.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 08-24-2009, 04:50 PM   #9
thehellman
User
 
Join Date: Jan 2006
Posts: 158

Submissions (2)

thehellman has little to show at this moment (4)

Default

I'm using Channel as the dummy spell. Give it a 2 second casting time. Cast the spell on an enemy target, then have the enemy target run into fog (black mask, whatever). The caster with then try to follow the target.

I didn't necessarily fix the problem, but I found out the user can just press S and it'll stop. It no longer becomes that big of a problem.
thehellman 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 08:20 AM.


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

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