help increase points skill

Do you need World Editor help? Ask here!
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.

Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.

Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.

Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
Squall
Posts: 11
Joined: Sun Sep 05, 2010 7:16 am

help increase points skill

Unread post by Squall »

i saw in a game, somthing at heros a book whit skills , if you press it is show skills. I want to know how to put that book, but more important, i want to put in that book some skills named, Strenght, Intelligence and Agility. If you choose one time one of those skills, Exemple Strenght it increase strenght by 1.
And at every level up you can choose 5 times the skills from the book. Like in this game: http://www.epicwar.com/maps/135667/
Please help me. Thank you.

Siraraz
Posts: 3
Joined: Wed Sep 22, 2010 6:20 am

Re: help increase points skill

Unread post by Siraraz »

With no idea what you are talking about (since you posted in not-the-best way), I'm going to assume you mean something similiar to the Hero Skills Tab ("O" being the hotkey?), and when clicked, you can upgrade stats.

That's probably a spellbook, with the abilities inside the spellbook being dummy abilities that raise your stat upon cast (and deduct a certain resource).

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: help increase points skill

Unread post by 3ICE »

Siraraz is right, that's a spell book with the icon changed to the red "+" of the Hero Abilities button.

You will need:
An integer array, lets call it PlayerPoints.
Three spells inside the spellbook: Str, Agi, Int. You can use any spells for this, just make sure they have no cooldown, no cast time, no targeting mechanism, and no mana cost. You also have to use three different spells because of a bug in wc3.
A trigger that has the event: Any unit begins casting a spell.
And conditions: Casting unit is a hero (just for safety) and PlayerPoints[Player number of(Triggering Player)] > 0
Three if/then/else blocks, checking if the Spell being case equals to those three dummy spells.
Depending on which spell was cast, add +1 to that stat of Casting Unit and take one off from PlayerPoints[Player number of(Triggering Player)]

And of course you will need to increment PlayerPoints[Player number of(Triggering Player)] by 5 every time a hero levels up.
ImageImageImageImageImage
Image
ImageImage

Squall
Posts: 11
Joined: Sun Sep 05, 2010 7:16 am

Re: help increase points skill

Unread post by Squall »

i didnt found "begins casting a spell" only "begins casting a ability" and what condition is that "PlayerPoints[Player number of(Triggering Player)] > 0"
how much Size should PlayerPoints have and what Variable Type?
Sorry if my questions looks like im a "noob".

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: help increase points skill

Unread post by 3ICE »

spell/ability: same thing.
PlayerPoints is increased by 5 every time your hero levels up. Doesn't that explain everything? You decrement it by 1 every time a player clicks the Str/Agi/Int buttons. It is a counter, to keep track of how many points a player can spend on +1ing his hero.
Array size does not matter, leave it at zero. Once you switch to StarCraft 2, array sizes will start to matter, but in wc3 arrays expand automatically so one less thing to worry about :)
About the variable type, I already said it should be an integer. It means "whole number" or something like that. Basically a counter that goes:
0->(wait for level up)->5->4->3->2->1->0->(wait for level up) and so on.
ImageImageImageImageImage
Image
ImageImage

Squall
Posts: 11
Joined: Sun Sep 05, 2010 7:16 am

Re: help increase points skill

Unread post by Squall »

"and take one off from PlayerPoints[Player number of(Triggering Player)]", how should i do this? i mean in If, Then,else?
I make one like this:
t_if If ((Ability being cast) Equal to Strenght ) then do (Hero - Modify Strength of (Triggering unit): Add 1) else do nothing

what should i put at else to descrease one point from PlayerPoints?

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: help increase points skill

Unread post by 3ICE »

You don't have TFT? Oh my, that's going to make it harder.
EDIT: If (PlayerPoints[Player number of(Triggering Player)]>0 ) then do set PlayerPoints[Player number of(Triggering Player)] = PlayerPoints[Player number of(Triggering Player)]-1 else do nothing
EDIT2: Add that at the end of your trigger.
ImageImageImageImageImage
Image
ImageImage

Squall
Posts: 11
Joined: Sun Sep 05, 2010 7:16 am

Re: help increase points skill

Unread post by Squall »

i do have TFT

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: help increase points skill

Unread post by 3ICE »

Then use the new way of doing if/then/else! The old way is terrible. :evil:
ImageImageImageImageImage
Image
ImageImage

Squall
Posts: 11
Joined: Sun Sep 05, 2010 7:16 am

Re: help increase points skill

Unread post by Squall »

what do you mean the new way?

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 116 guests