Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   Triggers & Scripts (http://www.wc3c.net/forumdisplay.php?f=8)
-   -   Ping minimap for items problem. (http://www.wc3c.net/showthread.php?t=110929)

Tallanar 11-29-2016 01:34 PM

Ping minimap for items problem.
 
Hello, it's been a long time since I played with Warcraft 3 WE, now I wanted to refresh it and I'm creating a light custom campaign for FT, but I have small problem with trigger wich pings
minimap for placed items on map.

Let's start with detailed explanation.

I placed on map 5 books of inteligence +2 wich are objects to bonus quest to find them.
I created trigger wich pings minimap where they placed. Basicly trigger works quite perfectly, but when Hero picks book and trigger starts again (time cycled trigger) minimap pings in point where book was picked and there is no item.

Take a look at trigger:
Trigger:
Collapse Events
Time - Every 80 seconds of game
Collapse Conditions
BonusQuest is enabled equals true
Collapse Actions
Set ItemPositions = (playable map area)
Item - Pick Every Item in ItemPositions and do (Actions)
loop
if (Item-Type of (picked item)) equals to Book Of Inteligence +2
then
Cinematic - Ping Minimap for (HumPlayer) at (ItemPositions) for 3.00 seconds using (simple) ping of color (59%, 80%, 80%)
custom script: call RemoveLocation(udg_ItemPositions)
else
Do Nothing

Sorry about indents, I didn't figured out how to use it properly.

Rao Dao Zao 11-29-2016 03:36 PM

Items that are automatically used don't die properly, they still kind of exist (see the shadows that reapper when you load a saved game). When the hero uses/acquires the item, make sure you explicitly destroy it -- can't remember off the top of my head, but there should be a Remove Item trigger.

Tallanar 11-29-2016 06:13 PM

Quote:

Originally Posted by Rao Dao Zao
Items that are automatically used don't die properly, they still kind of exist (see the shadows that reapper when you load a saved game). When the hero uses/acquires the item, make sure you explicitly destroy it -- can't remember off the top of my head, but there should be a Remove Item trigger.


Yes! There is such trigger to remove item from game, but it didn't work, map still pings at its position, but you gave me an idea to solve my problem.
I changed condition when picking items and I added to check item's life percentage and when I pick item, I set it life to 0% and in condition I added condition when pinging (greater than 1%)

Now trigger looks like this:
Trigger:
Set ItemPositions = (playable map area)
Item - Pick Every Item in ItemPositions and do (Actions)
loop
if (Item-Type of (picked item)) equals to Book Of Inteligence +2 and ((Current life of (Picked Item) Greater or Equal 1.00)
then
Cinematic - Ping Minimap for (HumPlayer) at (ItemPositions) for 3.00 seconds using (simple) ping of color (59%, 80%, 80%)
custom script: call RemoveLocation(udg_ItemPositions)
else
Do Nothing

And This works exacly as I desired.


All times are GMT. The time now is 03:11 AM.

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