Page 1 of 1

[Solved]Witch Hunt

Posted: Sat Feb 13, 2010 11:15 am
by Dylan1473
Currently, I am working on a map called "Witch Hunt". The concept is similar to that of Werewolf/Zerg Infestation/Parasite/Metastasis type maps. One person is randomly selected as a witch, and is trying to conceal their identity while ruining a small town. I'll try to limit questions I have for this map to this particular thread.

The first thing I want to do might be kind of tricky, but I'm fairly certain I've heard of something vaguely similar being done (though I'm not sure how to go about doing it):

I'd like to create an ability that will prevent a certain player from using chat for a set duration. This would be a "curse" by the witch used to silence someone else and possibly conceal his (the witch's) identity.

I don't really know JASS, so I'd prefer an answer for GUI. However, if it's impossible or too difficult to do GUI, I might be able to work with a sufficiently detailed JASS example (I am sort of familiar with some programming, and could conceivably tailor it to suit my specific purpose).

EDIT: If you're reasonably certain it can't be done, please say that as well. I've actually seen INSTRUCTIONS on how to do something sort of similar before, but can't find them. I have never actually seen it in action, though.

[Solved]Witch Hunt

Posted: Sat Feb 13, 2010 11:05 pm
by Azrooh
Put many spaces after the player in question's name. It will look terrible if he has living units, but it will hide anything he says.

Alternatively, you can follow this tutorial (http://www.thehelper.net/forums/showthread.php?t=51307&highlight=chat+system), and create your own chat system that creates a game message or floating text when they speak. With this you could easily do what you are asking.

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 10:48 am
by Dylan1473
Thanks, that looks like it should be able to do what I have in mind.

Second question, then (this one I'm not sure is even possible):

I would like to level up spells within a spellbook - but only SPECIFIC spells. Which is to say, I don't want to just place in higher level spells in general as the spellbook increases in level, but rather as changes are made to the player's hero I want spells to become more powerful. For example, the spell book is full of "skills" and I want it to reflect the actual skill of the player. The witchcraft skill would have different descriptions at different levels.

If this is absolutely impossible, I could just use variables to keep track and put it in a multiboard, but I'd prefer to actually have increasing skills. I'm fairly certain this can't be done with GUI.

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 11:51 am
by Azrooh
Make multiple levels, and use the action Unit - Increase Level of Ability. This will do what you're describing.

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 2:19 pm
by Dylan1473
I'm aware of how to do this. The issue is that the ability with multiple levels exists INSIDE the spell book (or it should - currently it doesn't even show up, possibly because it is within the spellbook). I don't think that particular action works WITHIN a spell book either (though I could be wrong; since I've been unable to put the levelled ability within the spellbook thus far, I haven't actually been able to test it).

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 3:01 pm
by Azrooh
What I have said works, even inside of spellbooks. Download the map attatched to this post.
Load it in WC3. Open your spell book, verify the ability is level 1. Now close the spell book. Type -lvl. Go back into the spellbook, and it will be level 2.
Go into the map, see I have not attatched any fancy bells and whistles, and you're good to go.

Attachments:

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 3:05 pm
by Dylan1473
That won't be necessary, actually. If the action works, it works. As I've just discovered, levelled spells DO work in the spell book, it's just that for reasons I do not yet understand the PARTICULAR spell with which I am concerned does not.

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 5:13 pm
by Azrooh
That.. Is very wierd. it should be working.
Have you tried remaking the spell with a different base?

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 6:58 pm
by Dylan1473
Yes. I based it off an attribute bonus at first because the ability exists only to influence the effect of others, but apparently attribute bonus-based abilities don't like being in spell books. So I based it off critical strike instead, and it seems to work ok now.

[Solved]Witch Hunt

Posted: Sun Feb 14, 2010 7:54 pm
by Azrooh
That works.

[Solved]Witch Hunt

Posted: Mon Mar 15, 2010 5:32 pm
by Dylan1473
New Issue:

I'm developing sort of an economic system (one of the skills is commerce) and players can buy structures for income and other benefits. It works ok for the most part - players can buy houses and get income for houses by buying an item. Here is the problem:

After houses are purchased, the item is still available. I've tried the obvious action to remove items from neutral buildings and added the "sell items" ability to affected buildings (apparently the action only works on buildings that have that ability) but the item, nonetheless, remains there.

This is important because it allows players to "buy" houses repeatedly, resulting in them spending more money but also gaining extra experience.

[Solved]Witch Hunt

Posted: Sun Mar 21, 2010 3:58 pm
by Azrooh
Disable the buying trigger once a house is bought.
After the house is bought, display 'This house is already bought.' and refund the gold.

[Solved]Witch Hunt

Posted: Sun Mar 21, 2010 5:02 pm
by Dylan1473
This has occured to me, and I'd rather I was able to just remove the item. However, I will implement this as an alternative solution if I can't find a better way.

[Solved]Witch Hunt

Posted: Mon Mar 22, 2010 3:43 pm
by Azrooh
Put the item in a sign just outside, delete the sign when the house is bought and replace it with a 'sell house' sign (if selling houses is possible in your game).

[Solved]Witch Hunt

Posted: Mon Mar 22, 2010 4:42 pm
by Dylan1473
Interesting solution, but I think that there are too many structures to do that. It's sort of a general purchase trigger.

I'll probably just make it a buy/sell button and refund cost if they choose to sell.