• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Koopa's Questions!

Status
Not open for further replies.
Level 9
Joined
Aug 11, 2007
Messages
429
(I made another thread cause the title was messed up.)

Ok i'm going to have a lot of questions, so, insted of making 5000 threads, heres one big one!


When you reply to a question tell me what number it is.

Question 1:

When i make a buff and an ability (Poision), its wierd because, when a unit gets infected, a little icon shows up at the bottom, but it says tooltip missing, and shows that dudes face lol, how i change that?



Question 2:

What would I do if I wanted a unit to enter a region, and that player would recive an income every minute of lets say 20 gold.
And change the color of the circle of power to that players color.And also grant them powers to open 2 gates. And then if they step on the red circle (to quit the job) it removes them from that job.




Question 3:

REMOVED
 
Last edited by a moderator:
Level 3
Joined
Apr 7, 2007
Messages
48
#1
OK Something really wierd is going on with the hive, I can't get into my PM box so I'll post it here.
  • Zombie Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
      • (Unit-type of (Triggering unit)) Equal to Zombie
    • Actions
      • Custom script: call Create_Unit()
JASS:
function Create_Unit takes nothing returns nothing
    local real x = GetUnitX(GetTriggerUnit())
    local real y = GetUnitY(GetTriggerUnit())
    call TriggerSleepAction(10.0)
    call CreateUnitByName(GetOwningPlayer(GetTriggerUnit()),"Rifleman",x,y,0.)
    //Replace Rifleman with the name of your unit
endfunction
Ok place the code part on the map itself. in the trigger editor click on the map and paste the code in the text window that is called Custom Script Code.
Then make the trigger and change the values as you please. Be sure to change the "Rifleman" string to the name of your unit that you want to spawn.

(Oh yes and If any of y'all JASS pros out there wanna correct my code go ahead.)
#2
Go to Advanced->Gameplay Constants->Hero Max Level
and change it to w/e you want. Make sure to check "Use Custom Values"
 
Last edited by a moderator:
Level 9
Joined
Aug 11, 2007
Messages
429
how am i supposed to fit this:


function Create_Unit takes nothing returns nothing
local real x = GetUnitX(GetTriggerUnit())
local real y = GetUnitY(GetTriggerUnit())
call TriggerSleepAction(10.0)
call CreateUnitByName(GetOwningPlayer(GetTriggerUnit()),"Rifleman",x,y,0.)
//Replace Rifleman with the name of your unit
endfunction



in one line?
 
Level 11
Joined
Aug 25, 2006
Messages
971
Its quite simple. In the trigger editor look to the left column. This is where the different categories of triggers are. At the top of all these categories is the map name itself. Click that. To the right in the trigger box you will see a blank space. (Possibly filled if you enabled advanced triggers with WEU) Paste the code he gave you in the top of the bottom box. (Sounds funny, but don't paste it in the top box, it won't do anything) This box is the Custom Script box.
 
Level 9
Joined
Aug 11, 2007
Messages
429
When i paste it in and make a trigger, it says their is an error:


JASS:
function Trig_Zombie_Man_Dies_Spawn_Conditions takes nothing returns boolean
    return GetOwningPlayer(GetTriggerUnit()) == Player(11) and GetUnitTypeId(GetTriggerUnit()) == 'u001' )
endfunction

function Trig_Zombie_Man_Dies_Spawn_Actions takes nothing returns nothing
    call Create_Unit()

____________


???

Ohh well, I have other questions, ill update it.

thanks to everyone who helps me. I updated the questions.
 
Last edited by a moderator:
Level 11
Joined
Aug 25, 2006
Messages
971
Your code is missing an
JASS:
endfunction
Without if, of course you will get an error.
Add it to the end of the code. [The code that you displayed.]
So it would look like:
JASS:
function Trig_Zombie_Man_Dies_Spawn_Conditions takes nothing returns boolean
    return GetOwningPlayer(GetTriggerUnit()) == Player(11) and GetUnitTypeId(GetTriggerUnit()) == 'u001' )
endfunction

function Trig_Zombie_Man_Dies_Spawn_Actions takes nothing returns nothing
    call Create_Unit()
endfunction
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
When i paste it in and make a trigger, it says their is an error:


JASS:
function Trig_Zombie_Man_Dies_Spawn_Conditions takes nothing returns boolean
    return GetOwningPlayer(GetTriggerUnit()) == Player(11) and GetUnitTypeId(GetTriggerUnit()) == 'u001' )
endfunction

function Trig_Zombie_Man_Dies_Spawn_Actions takes nothing returns nothing
    call Create_Unit()
What is this ? xD
Why did you changed your code to Custom Text
you could Easly add Custom script: call Create_Unit()
but you need the copy that dreadlord guys function to map header (<map name>.mdx in trigger editor)
 
Level 9
Joined
Aug 11, 2007
Messages
429
Your code is missing an
JASS:
endfunction
Without if, of course you will get an error.
Add it to the end of the code. [The code that you displayed.]
So it would look like:
JASS:
function Trig_Zombie_Man_Dies_Spawn_Conditions takes nothing returns boolean
    return GetOwningPlayer(GetTriggerUnit()) == Player(11) and GetUnitTypeId(GetTriggerUnit()) == 'u001' )
endfunction

function Trig_Zombie_Man_Dies_Spawn_Actions takes nothing returns nothing
    call Create_Unit()
endfunction



alright, anything i need to add to that? or is it good to go :)





Alright, forget this, i still cant get it, so just move on to some of my other questions please.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
As you plainly refuse to read the rules, your on your last warning.

We will not tell you how to protect your map, want to do that, find out your self. The reason is that we do have rules saying you may not ask for map protection / unprotection aid.

However I can recomend vexorians optimizer thou to make your map smaller and run better / more efficently as a final step for your map before releasing it.
 
Level 9
Joined
Aug 11, 2007
Messages
429
I read the rules and it just talks about double posting, so i dont know what i am doing wrong here, i made a thread to post all my questions insted of making 10 threads about them. And the map protection i can understand.
 
Level 8
Joined
Feb 20, 2007
Messages
338
(I made another thread cause the title was messed up.)

Question 2:

What would I do if I wanted a unit to enter a region, and that player would recive an income every minute of lets say 20 gold.
And change the color of the circle of power to that players color.And also grant them powers to open 2 gates. And then if they step on the red circle (to quit the job) it removes them from that job.

Since you want so much to take place with your triggers, I would suggest having two triggers. One for when a unit enters a region (matching the condition that they are owned by X player) and one for leaving a region.

A third trigger would be every 60 seconds (actually more than just 3, one for each player group) that would pay out 20 gold every 60 seconds.

  • Income Red
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Player - Add 20 to Player 1 (Red) Current gold
One for each team. You will have to right click on the name of trigger in the left menu bar and uncheck 'Initially on'

  • Income trigger Region
    • Events
      • Unit - A unit enters Temple Main <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Entering unit) is in (Units owned by Player 1 (Red))) Equal to True
        • Then - Actions
          • Unit - Change color of Circle of Power (large) 0009 <gen> to Red
          • Trigger - Turn on Income Red <gen>
          • (Other actions here)
        • Else - Actions
One if/then else function for each team you are using Changing the targets, color, blah for each team.

You will need a second version for leaving the region, again one if/then/else per team, this time changing the color of the Circle to its default team (I assume Neutral Passive), turning off the corresponding income trigger, etc. etc. etc.

(other actions here): Since I do not know what you mean by 'job' and how you plan on making it possible for gates to open and close I do not know if you need to add an ability, remove an ability, turn on a trigger, turn one off, finish a quest, mark a quest as completed, in the words of the Archmage - "whatever".

As for opening gates, it can be in the form of keys. Make a region before the gate, then using another Unit enters region your something like this:
  • Moon Gate Key
    • Events
      • Unit - A unit enters Moongate <gen>
    • Conditions
      • ((Entering unit) has an item of type Moon Key) Equal to True
    • Actions
      • Destructible - Open Elven Gate (Horizontal) 1888 <gen>
If you use that then you will most likely want to create a moon key in the previous trigger.

There are other ways to do this.
 
Status
Not open for further replies.
Top