Welcome Guest [Log In] [Register]
Welcome to Chaos Realm!!!


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote Multiquote
Add Reply
Triggering [GUI/MUI/vJASS] Question and Answer.; From the basics to the advanced
Topic Started: Sep 23 2016, 01:40 PM (1,737 Views)
RiskYourLife
Member Avatar
Crypt Lord Level 3
[ *  *  * ]
Question & Answer with ChaosRealm coders
From the basics to the advanced

In this topic, I will track any question about triggering/coding and I will compile it here.

Feel free to ask me anything about WC3 coding.
Leave your questions in the reply and we will answer. :)
Edited by RiskYourLife, Oct 12 2016, 12:43 AM.
Offline Profile Quote Post
 
Syaoran clone
Member Avatar
BeastMaster Level 7
[ *  *  *  *  *  *  * ]
I want to ask you about my AI request
Offline Profile Quote Post
 
RiskYourLife
Member Avatar
Crypt Lord Level 3
[ *  *  * ]
AI... from my shop. I've left it for months
It is finished but it have some serious bug. I've made a mistake in the code.
I have to recode half of the code, and I don't think I can finish it with bug clean.
but I will try.

Anime Warfare Project

Posted Image

Terrain : |||||||||||||||||||||||||||||||||||||||| - 87%
Trigger : |||||||||||||||||||||||||||||||||||||||| - 48%
Character : |||||||||||||||||||||||||||||||||||||||||| - 18%
Decoration : |||||||||||||||||||||||||||||||||||||||| - 60%
Offline Profile Quote Post
 
Syaoran clone
Member Avatar
BeastMaster Level 7
[ *  *  *  *  *  *  * ]
it's okay. I will need some main codes from it
Offline Profile Quote Post
 
RiskYourLife
Member Avatar
Crypt Lord Level 3
[ *  *  * ]
Lufion question, found from this link

Quote:
 
Im not that bad actually but well forget it. It works now, and I have a new question so if you dont mind to help.


Now I want to make a "Base System" so I made a Circle and in that circle I created a region called Base.
Also I have severel Towers called "Base Tower" that shall act as defence towers that surround the Base.

So now I want that if a Hero enters the region i made in the circle, the towers and the circle change theyre ownership to the Player that owns the hero that entered the region. I managed to do that with no problems, and created 2 Variables,
First = triggering unit,
Second = Units owned by the owner of the entering Unit matching is mechanical = true / the towers are mechanical

As I said the first part works so, when a unit that has to be a hero, enters the region, the towers and the circle change theyre ownership to the owner of the entering heroes colour.

The problem is now that I cant make it undo. So I want it to kinda reset when the Hero that entered the region dies
meaning that the tower and the circle go back to theyre neutral passive faction and change theyre colour to grey again, until the next Player/Hero walks on the Circle to make them change again and so on.

So ive added this timer thing, that says Wait until Aka_Base //that is the triggering unit\\ is death equal to true checking every 1 seconds
and as action after it
Unit group - Pick every unit in Aka_Base2//so the mechanical units that are now under control of the triggering unit (entering Hero) that are in this case only the towers\\ and do actions
Unit - change ownership of picked unit//since I pick the units in the group as u told me\\ to neutral passive and change colour
and after that i removed everyone from group Aka_Base2

Effect : As i said i can walk with a hero in the circle and the towers and circle change ownership + colour to that one of the entered Unit/Hero but when the Hero dies nothing happens, so they dont change back to neutral passive and also dont change theyre colour.


Thanks


Wow @@! will have lot of answers

Simple, just create a new player variable and name it to something like Default_BaseOwner and set it to the default owner. When the new owner dies, change the owner to Default_BaseOwner. And don't use Wait until the owner dies, create a new trigger and add Any unit dies event. Filter it (put condition) and do the owner change actions. Hope that is clear :)



Next, I will talk about bad things in the code.

1> In your code, you're using Units owned by the owner of the entering Unit matching is mechanical = true. I quite worry about this variable. You have to add a unit type filter or unit in region group, so the filter won't pick mecha units from the entire map.

2> Never use Wait action, it slows game performance.

3> Group leak, destroy the Aka_Base2 with Custom Scripts : call DestroyGroup(udg_Aka_Base2) at the end of the line

Anime Warfare Project

Posted Image

Terrain : |||||||||||||||||||||||||||||||||||||||| - 87%
Trigger : |||||||||||||||||||||||||||||||||||||||| - 48%
Character : |||||||||||||||||||||||||||||||||||||||||| - 18%
Decoration : |||||||||||||||||||||||||||||||||||||||| - 60%
Offline Profile Quote Post
 
Lufion
Member Avatar
Mountain Giant
[ * ]
Hey guys me again. I want to make a passive Spell that gives the user

+100 dmg
+100 agi
30% evasion
20 Armor
25% Chance to crit

How do I do this ? do I need triggers ? or just some Passive spell from warcraft 3.
Heres a screen from the game that has this spell aswell.

In this map its a spellbook with an active spell and 2 passive spells.
Well I tried it like this now:

Create a spellbook,
create 2 Abilities, the first one is Extra Attribute where I let the user get +100 agi
and the second ability would be Critical Strike, because I can customize the whole crit stuff i mentioned +dmg I guess correct me if im wrong.

Only missing would be armor then so would be nice if someone could tell me a ability that gives armor.

well ye then I would add the passives to the spellbook and add the spellbook to the unit I want to have the passives.
The thing is that I cant add my Spellbook to a unit, or maybe im just doing it wrong.
Attached to this post:
Attachments: Sharingan_1.png (1.48 MB)
Attachments: Sharingan_2.png (1.47 MB)
Attachments: Sharingan_3.png (1.47 MB)
Attachments: Sharingan_4.png (1.48 MB)
Edited by Lufion, Oct 31 2016, 11:21 PM.
Offline Profile Quote Post
 
RiskYourLife
Member Avatar
Crypt Lord Level 3
[ *  *  * ]
There are plenty ways to do this,
The easiest way is by using the item abilities. Go to Object Editor [F6] and in the ability tab go to (Special>Items) and you will see ton of item ability or I like to call Stats HEAVEN

For +damage, find Item Damage bonus
For +agility, find Item Hero Stat Bonus (agility).
For +evasion, find Evasion (item)
For +armor, find Item Armor Bonus

For +crit chance, find Critical strike.
You can also use trigger to apply critical strike if you want advanced control over it.

About spellbooks, I want you to post the trigger so I can check it.

I hope you know what to do from now on
You're free to ask if you still have problems, I'm ready to answer :)
Edited by RiskYourLife, Nov 1 2016, 05:45 AM.
Offline Profile Quote Post
 
Lufion
Member Avatar
Mountain Giant
[ * ]
Heres my Trigger I managed to add the spellbook now but the Passive abilities dont work and dont show up.
But when I add them to standart spells of the character they work

Event
Unit A unit gains a level

Condition
(level of (triggering unit)) equal to 20
((Triggering unit) is a Hero) equal to true
(Unit-type of (Triggering unit)) equal to Sasuke

Action
Unit - add sharingan book to (triggering unit)


As i said the book appear when the character reaches 20 but no stats or other passives get activated
Nvm everything works fine now

I made a trigger and it dont work as it should so pls check it for me and tell me whats wrong.

The trigger is a spell trigger (tsukuyomi spell) (target spell)

it pauses the caster and the target and creates a red room where the target is and a itachi clone infront of the target. after a few sec amaterasu appears on the target and it gets damaged x.... .

This time i made a trigger with the variables and one where the amaterasu appears and the unit gets damaged. in the end there are also the dummy removals

The problem is that the spell dont end and both units are paused the whole time even when the target unit died already
Attached to this post:
Attachments: Trig_1.png (236.94 KB)
Attachments: Trig_2.png (129.08 KB)
Edited by Lufion, Nov 2 2016, 06:57 PM.
Offline Profile Quote Post
 
Lufion
Member Avatar
Mountain Giant
[ * ]
Beep beep.
Offline Profile Quote Post
 
Lufion
Member Avatar
Mountain Giant
[ * ]
I need help with a spell again. I want to make a Sage mode spell from Naruto.

I want to make a spell that the hero gets at level 100
that spell is an activation spell with a 10 sec cast time and after that 10 sec I want to remove the activation spell and add a spellbook instead to get stats and new skills in the spellbook (so like the Sharingan passive thing in my last question).

Duration is lets say 60 seconds and after that 60 seconds I want to remove the spellbook again and add this activation spell instead and loose the stats that were added from the passives in the spellbook and also the spells ofc.

Question is how do I do this?

Offline Profile Quote Post
 
Lufion
Member Avatar
Mountain Giant
[ * ]
And how to add a buff to a unit? Ive read that you have to create a unit that casts the buff on the hero but how can i determine which buff the unit casts I can only do for example : Order unit to "hex" triggering unit or Order unit to Inner "curse" .. unit and so on but what if I want to add a specific buff to the trig unit pls help also to the other questions I posted here ._.
Offline Profile Quote Post
 
TZero
No Avatar
Peon
[ * ]
Hi i want to know how to put a black background
Behind two characters, i don't know how to call it.
For example, i'll put a camera seeing those characters like a 2d battle game and i want to hide all the things except those two like some maps do.
Sorry if my english isn't the best.


Offline Profile Quote Post
 
1 user reading this topic (1 Guest and 0 Anonymous)
DealsFor.me - The best sales, coupons, and discounts for you
« Previous Topic · Triggering Classes · Next Topic »
Add Reply

War3 Modding

Blizzard Modding

Other Games

Community

MARKET
Models & Skins
Spells
Ongoing Contests
Hosted Projects
World of Warcraft
Starcraft 2
Diablo III
Heroes of the Storm
Dota 2
League of Legends
Members
Awards
Introductions
Contact

Copyright © 2011-2015 Chaos Realm. A project initiated by Bogdan Radu.