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 > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 07-09-2010, 07:33 AM   #1
PsiSan
User
 
PsiSan's Avatar
 
Join Date: Oct 2008
Posts: 20

PsiSan has little to show at this moment (0)

Send a message via MSN to PsiSan
Default Some more Help plz

Anyhow another 2 things quick:

1.) Making items stack when you pick them up (of the same type)

2.) I cant seem to get it right, that when a unit attacks it has a chance to to apply an ability on the attacked unit. (exp: i want to add slow poison with a % chance to do so)
PsiSan is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-09-2010, 08:42 AM   #2
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

1) check all items an unit carries when it picks one. if it has alredy one of that type, add the charges of the picked item to the found item's charges and remove the picked item

2) unit attack events fire before the attack is launched, so it should work to check
- if the unit has the desired ability (level > 0) then
remove it
else
-if ramodmreal(0.0,1.0) less or equal than <your chance> (e.g 0.2 for 20%) if this expression is true, add the desired ability to the attacker
__________________
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 07-09-2010, 09:25 AM   #3
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

Tot, that's silly; it fails entirely to account for the time between the launch of attack and the impact, whether ranged or melee. A damage-detection system is advised for such things.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2
Archmage Owenalacaster is offline   Reply With Quote
Old 07-09-2010, 10:41 AM   #4
PsiSan
User
 
PsiSan's Avatar
 
Join Date: Oct 2008
Posts: 20

PsiSan has little to show at this moment (0)

Send a message via MSN to PsiSan
Default

There is no attack event on my worldeditor, there is on "is attacked"
PsiSan is offline   Reply With Quote
Old 07-09-2010, 12:33 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

Quote:
Originally Posted by PsiSan
There is no attack event on my worldeditor, there is on "is attacked"

that's what i ment

Quote:
Originally Posted by Archmage Owenalacaster
Tot, that's silly; it fails entirely to account for the time between the launch of attack and the impact, whether ranged or melee. A damage-detection system is advised for such things.

yea, but it should be sufficient...the best way would be to fully trigger it (without adding an ability...bu that's to much effort to do in GUI
__________________
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

Last edited by Tot : 07-09-2010 at 12:35 PM.
Tot is offline   Reply With Quote
Old 07-09-2010, 12:40 PM   #6
PsiSan
User
 
PsiSan's Avatar
 
Join Date: Oct 2008
Posts: 20

PsiSan has little to show at this moment (0)

Send a message via MSN to PsiSan
Default

Lolz, my jass skill are shit?! maybe a gui example?
PsiSan is offline   Reply With Quote
Old 07-09-2010, 02:05 PM
Anitarf
This message has been deleted by Anitarf. Reason: more posts were posted in the meantime.
Old 07-09-2010, 02:37 PM   #7
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 641

Submissions (2)

Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)

Default

Actually, you might not need triggers for this at all...

Look up the Item Ability Orb of Slow. It applies a chance that an attack causes an ability to affect the attacked unit.
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...
Themerion 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:22 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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