Need help here!!

Blade_Masta

New Member
hey guys i got prob with my quest trigger!!
1.When i complete my quest it doesnt show any message saying that ive completed(but when i check quest it's marked complete)
2.When ive done my quest that is killing 10 kobold,after the 10th kill it goes to -1 why??
3.When ive finished complete quest i want to give reward to my guy:D,(i want him to go near my quest give and then he receive the reward+mark quest complete :),hope not asking for the impossible lol)

For my triggers here they are

My first trigger
Give Quest
Events
Unit - A unit enters Area1 <gen>
Conditions
Actions
Quest - Create a Optional quest titled The Human Outpost with the description The Human Outpost h..., using icon path ReplaceableTextures\CommandButtons\BTNKobold.blp
Quest - Disable (Last created quest)
Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
Quest - Enable (Last created quest)
Quest - Flash the quest dialog button
Custom script: endif
Quest - Display to (Player group((Owner of (Triggering unit)))) the Quest Discovered message: |cffffcc00Quest|r -...
Quest - Create a quest requirement for (Last created quest) with the description Kill 10 Kobolds
Trigger - Turn off (This trigger)

And for my 2cd trigger
Quest Update
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
(Unit-type of (Dying unit)) Equal to Kobold
Actions
Set Quest_Kobold_Integer = (Quest_Kobold_Integer + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Quest_Kobold_Integer Equal to 10
Then - Actions
Quest - Mark (Last created quest) as Completed
Quest - Change the description of (Last created quest requirement) to <Empty String>
Else - Actions
Quest - Change the description of (Last created quest requirement) to (Kill + ((String((10 - Quest_Kobold_Integer))) + Kobolds))


Ty to answer my question :D
 

foodflare

You can change this now in User CP.
In the then area of 2nd trigger ad
Game - Display to (All players) the text: Completed Quest!
or something of that sort to show completed quest
 

xfirenzx

New Member
1. Add this to your 2nd trigger under actions

Code:
Quest - Display to (All players) the Quest Update message: Quest Complete!
2. Don't know

3. Use this to give gold

Code:
Player - Add 100 to (Owner of (Entering unit)) Current gold
and this to give experience to the hero
Code:
Hero - Add 150 experience to (Entering unit), Show level-up graphics
 

foodflare

You can change this now in User CP.
try changing from 'equal to' to 'greater than or equal to'

and try setting it to a quest variable so that if you make a new quest it wont screw up. Also, that could help with the -1 problem
 

Blade_Masta

New Member
Yea i understand that and i added it to my triggers,but is there a way to show that ..you received 100 gold and 150 exp or something like that...?
see my trigger
The 2cd one
Quest Update
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
(Unit-type of (Dying unit)) Equal to Kobold
Actions
Set Quest_Kobold_Integer = (Quest_Kobold_Integer + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Quest_Kobold_Integer Equal to 10
Then - Actions
Quest - Mark (Last created quest) as Completed
Quest - Change the description of (Last created quest requirement) to <Empty String>
Quest - Display to (All players) the Quest Update message: Quest Completed
Player - Add 200 to (Owner of (Entering unit)) Current gold
Hero - Add 150 experience to (Hero manipulating item), Show
level-up graphics
Else - Actions
Quest - Change the description of (Last created quest requirement) to (Kill + ((String((10 - Quest_Kobold_Integer))) + Kobolds))
 

Blade_Masta

New Member
lol but i want to be a text message saying near my quest giver guy,so that way they know what they get :) i think you understand me?
 

PurgeandFire

zxcvmkgdfg
Turn off the trigger in the "Then" actions. Otherwise, if you attack another kobold it will start over and go to 1. Then 2 and so on because Kobold integer becomes 11 and up. You can either do that or put:

Code:
Quest_Kobold_Integer [B]Greater Than[/B] or Equal to 10
But either way, then it will just keep marking the quest as complete and stuff. It doesn't really make a difference though. :p
 

Blade_Masta

New Member
There a probleme with my exp and gold trigger
Quest Update
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
(Unit-type of (Dying unit)) Equal to Kobold
Actions
Set Quest_Kobold_Integer = (Quest_Kobold_Integer + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Quest_Kobold_Integer Equal to 10
Then - Actions
Quest - Mark (Last created quest) as Completed
Quest - Change the description of (Last created quest requirement) to <Empty String>
Quest - Display to (All players) the Quest Update message: Quest Completed
Player - Add 200 to (Owner of (Entering unit)) Current gold
Hero - Add 150 experience to (Hero manipulating item), Show level-up
graphics
Trigger - Turn off (This trigger)
Else - Actions
Quest - Change the description of (Last created quest requirement) to (Kill + ((String((10 - Quest_Kobold_Integer))) + Kobolds))

they dont seems to work is there something wrong??
 

Knight7770

Hippopotomonstrosesquiped aliophobia
There is no entering unit or hero manipulation item.
 

Sooda

Diversity enchants
Next time right click on your trigger and choose save as text. Then paste your triggers between [noparse]
Code:
your GUI triggers
[/noparse] tags, these tags looks like

Firstly I assume in your heart you want this quest to be multi player usable (otherwise there would not be point to use local player neither). I tell you quickly that your so far local player custom script will desync in multiplayer for sure.
Lets start by creating player variable array and name it 'koboldQuestPlayer'
'koboldQuestPlayer' is player variable array and starts with default starting values.
Also you want to approaches to quest giver to receive reward. For that we need first unit into who' s range our adventurer comes. For that we create one unit variable and name it.
'koboldQuestGiver' is a unit variable and starts with default values.
Now we need integer array for each player to keep track of killed Kobolds.
'koboldQuestKills' is a integer variable array and starts with default values.
As a side not I have to tell you that memory leaks are from evil, avoid them when ever possible. I teach you some basics. Removing location leaks is most important and removing special effect leaks also.
We create one point variable and name it temporarily so we know it isn' t something important and will be used for most of our location actions. When you use custom script then all your made variables from Variable Editor has 'udg_' prefix. For example 'tempPoint' becomes 'udg_tempPoint' (without '').
'tempPoint' is point variable and starts with default values.
'kobaldQuestEffect' is special effect variable and starts with default values.
Firstly lets initialize quest:
Code:
Init Kobold Quest
    Events
        Map initialization
    Conditions
    Actions
        -------- Where ever you would like to create it. --------
        -------- X, Y and Z coordinates are your friends. --------
        Set tempPoint = (Point(0.00, 0.00))
        Set tempPoint = (Center of (Playable map area))
        Unit - Create 1 Paladin for Neutral Passive at tempPoint facing Default building facing degrees
        Special Effect - Create a special effect attached to the overhead of koboldQuestGiver using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
        Set koboldQuestEffect = (Last created special effect)
        -------- We don' t need anymore our temporary point, lets remove it. --------
        Custom script:   call RemoveLocation(udg_tempPoint)
        -------- You can' t start Kobold quest while you are already doing that quest. Initialize boolean values for players. --------
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Set koboldQuestActive[(Integer A)] = False
        -------- We add new event to our quest start trigger what detects units in range. --------
        Trigger - Add to Start Kobold Quest <gen> the event (Unit - A unit comes within 256.00 of koboldQuestGiver)
We also need to know what unit is matching unit to kill our Kobolds.
'koboldQuestUnit' is unit variable array and stars with default values.
'tempPlayer' is a player variable and starts with default values.
'tempUnit' is a unit variable and starts with default values.
'tempQuest' is quest variable and starts with default values.
'tempForce' is player group variable and starts with default values.
'koboldQuestActive' is boolean array variable and starts with default values.
Code:
Start Kobold Quest
    Events
    Conditions
    Actions
        -------- Declaring locals needs to be first thing in trigger. --------
        Custom script:       local player whichPlayer = null
        Custom script:       local quest whichQuest = null
        -------- Though you don' t see events they were added there by our Init Kobold Quest trigger. --------
        -------- Now the fun part. --------
        -------- Hint use one temp integer variable to store player index and use that integer variable instead my mindless conerting. --------
        Set tempUnit = (Triggering unit)
        Set tempPlayer = (Owner of tempUnit)
        -------- Already doing quest? End it first! --------
        If (koboldQuestActive[(Player number of tempPlayer)] Equal to True) then do (Skip remaining actions) else do (Do nothing)
        Set koboldQuestUnit[(Player number of tempPlayer)] = tempUnit
        Set tempForce = (Player group(tempPlayer))
        -------- Remember 'udg_' prefix! --------
        Custom script:       set whichPlayer = udg_tempPlayer
        Quest - Create a Optional quest titled Kobold feaver with the description Kingdom needs you, ..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
        Custom script:       set whichQuest = bj_lastCreatedQuest
        -------- Now there is high risk that you desync game even when all is done right what can be done. --------
        -------- To remind NEVER create, destroy for only one player. Using only local code and natives is a must. --------
        Custom script:       if whichPlayer == GetLocalPlayer() then
        Custom script:           call QuestSetEnabled(whichQuest, true)
        Custom script:           call FlashQuestDialogButton()
        Custom script:       endif
        Quest - Display to (Player group(tempPlayer)) the Quest Discovered message: Kill 10 Kobolds who...
        Quest - Create a quest requirement for tempQuest with the description -- Kill 10 Kobolds
        Set koboldQuestActive[(Player number of tempPlayer)] = True
        -------- All local variables needs to be nulled in the end. Though to native locals like booleans, integers, reals, players it dosn' t apply. There are special cases also with units and more. --------
        -------- Removing force (in GUI Player Group) leaks. --------
        Custom script:       call DestroyForce(udg_tempForce)
        Custom script:       set whichPlayer = null
        Custom script:       set whichQuest = null
We are almost done:
'tempIndex' is integer variable and starts with default values.
'koboldQuestPlayerScore' is integer variable array and starts with default values.
Code:
Kobold Quest Award
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Kobold Geomancer
    Actions
        Set tempUnit = (Killing unit)
        Set tempPlayer = (Owner of tempUnit)
        Set tempIndex = (Player number of tempPlayer)
        -------- Is our player doing Kobold Quest? --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                koboldQuestActive[tempIndex] Equal to True
            Then - Actions
                -------- Lets add to counter. --------
                Set koboldQuestPlayerScore[tempIndex] = (koboldQuestPlayerScore[tempIndex] + 1)
            Else - Actions
        -------- This thing isn' t in 'ELSE' actions so be careful, --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                koboldQuestPlayerScore[tempIndex] Greater than or equal to 10
            Then - Actions
                -------- Can' t be finally our quest is complited. --------
                Player - Add 100 to tempPlayer Current gold
                -------- It isn' t tempQuest anymore, better get for it quest variable what is safe from overwriting. --------
                Hero - Add 100 experience to tempUnit, Show level-up graphics
                Quest - Mark tempQuest as Completed
            Else - Actions
Doing quests needs thinking before then thinking again and much practice. For future reference 'LastCreayedWhatever' changes pretty fast. If you need to store something for later use save it to your made variable. As you can see I never destroyed our special effect. It can be done with script:
JASS:
    call DestroyEffect(udg_koboldQuestEffect)

Aww, sleepy, read quest making tutorials to get better.

EDIT:
Please read: Quest Tutorial by Husky
 

Blade_Masta

New Member
Code:
Quest Update
    Events
        Unit - A unit owned by Neutral Hostile Dies
    Conditions
        (Unit-type of (Dying unit)) Equal to Kobold
    Actions
        Set Quest_Kobold_Integer = (Quest_Kobold_Integer + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Quest_Kobold_Integer Equal to 10
            Then - Actions
                Quest - Mark (Last created quest) as Completed
                Quest - Change the description of (Last created quest requirement) to <Empty String>
                Quest - Display to (All players) the Quest Update message: Quest Completed
                Player - Add 200 to (Owner of (Entering unit)) Current gold
                Hero - Add 150 experience to (Hero manipulating item), Show level-up graphics
                Trigger - Turn off (This trigger)
            Else - Actions
                Quest - Change the description of (Last created quest requirement) to (Kill  + ((String((10 - Quest_Kobold_Integer))) +  Kobolds))
like this??
 

Blade_Masta

New Member
Umm rhanks alot for your hard work sooda,but my prob is that i needed to look at the map :( anyways if you could put those triggers together and post a map for or any1 else it will b really kool ty :)
 

Blade_Masta

New Member
Ywa so dark here were i get stuck
Code:
Init Kobold Quest
    Events
        Map initialization
    Conditions
    Actions
        [COLOR="Red"]Set tempPoint = ((Center of (Playable map area)) offset by (0.00, 0.00))[/COLOR]        Set tempPoint = (Center of (Playable map area))
        Unit - Create 1 Paladin for Neutral Passive at tempPoint facing Default building facing degrees
        Special Effect - Create a special effect attached to the overhead of koboldQuestGiver using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
        Set kobaldQuestEffect = (Last created special effect)
        Custom script:   call RemoveLocation(udg_tempPoint)
        For each (Integer A) from 1 to 12, do (Actions)
            [COLOR="Red"]Loop - Actions[/COLOR]
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    it is not that power consumption went up it was available capacity went down with power plants freezing
  • Varine Varine:
    What a fucking disaster. Are all of the Texas people okay? I see TH is, are we the only two?
  • Varine Varine:
    How have the other states held up? I just got power back so I have no idea what's going on, we didn't get warning
  • Varine Varine:
    Why the fuck didn't they fix this ten years ago when it happened?
  • Blackveiled Blackveiled:
    I'm in it with you and TH as well. My power has been in and out, and I have a ruptured pipe that I need to fix, shouldn't be too bad to fix myself.
  • Varine Varine:
    I hope you're staying warm! Apparently the supply is coming up so hopefully we can get back to normal power soon, mine has been on for six hours now.
  • M Mulciberxp:
    My power has been off most of the last 2 days. We had a generator installed 3 years ago though, so we're staying warm. Water is another issue...
  • The Helper The Helper:
    Where I live has a pool so we are using that to get water to flush the toilets. We have enough bottled water to drink and brush teeth and stuff but it has been a few days and no shower though....
  • Varine Varine:
    I had some water in gallon jugs, and got our water back on yesterday. We don't seem to have any leaks, but I haven't crawled down there to look yet.
  • The Helper The Helper:
    still no water I cannot remember when I last showered now I know how they felt in the old west lol
  • Varine Varine:
    My poor plants are happy, they aren
  • Varine Varine:
    aren't used to going this long without water or lights or normal heat. I think a couple of them froze, but they look like they'll make it
  • Varine Varine:
    Well one of them is pretty rough but I think it was sick to begin with, that one always had some problems.
  • jonas jonas:
  • jonas jonas:
    ???
  • Ghan Ghan:
    That is such a Texas thing to say lol
  • midnight8 midnight8:
    a positive could come out of this. So many people trapped at home could put a dent in the covid numbers in Texas
  • Varine Varine:
    That dude, Tom Boyd, is really upset about the backlash from his "it's your fault you're freezing" thing because he claims he resigned before saying it, so it wasn't like he said it in his official capacity or anything.
  • jonas jonas:
    Almost as if he was saying "screw you guys, I'm going home"
  • Varine Varine:
    I'm fairly new here still but that seems to be the analogous message by several of our politicians.
  • vypur85 vypur85:
    Nobody?
  • jonas jonas:
    Hi vypur85, long time no see
  • tom_mai78101 tom_mai78101:
    Hi vypur85, long time no see.
  • The Helper The Helper:
    We are all somebody
  • Varine Varine:
    I kinda like being nobody tho.

    Members online

    Affiliates

    Hive Workshop NUON Dome
    Top