diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-13 08:51:49 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-13 08:51:49 -0400 |
commit | 5adabb82443b9b10b25cdd8b4db3cfe890e36fa1 (patch) | |
tree | 698e88e97b0fd0c526bec844f345e9aa4ef24321 /src/gameplay.cpp | |
parent | 3d375c17982f9f459c82364117687d145540fe75 (diff) | |
parent | 58716d5e4f20eb5a30025c88fe5119a0e40c4187 (diff) |
Added rabbit, and player health
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r-- | src/gameplay.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 5ffe5a6..17a7bed 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -20,15 +20,8 @@ int compTestQuest(NPC *speaker){ } int giveTestQuest(NPC *speaker){ - static bool done=false; - if(!done){ - ui::dialogBox(speaker->name,"Here, have a quest!"); - player->qh.assign("Test"); - done=true; - } - /*while(ui::dialogBoxExists){ - mainLoop(); - }*/ + ui::dialogBox(speaker->name,"Here, have a quest!"); + player->qh.assign("Test"); NPCp(entity[2])->addAIFunc(compTestQuest); return 0; } @@ -70,9 +63,10 @@ void initEverything(void){ entity[entity.size()-1]->spawn(200,100); //sets the position of the villager around the village entity.pop_back(); + + NPCp(entity[1])->addAIFunc(giveStuff); NPCp(entity[1])->addAIFunc(giveTestQuest); for(i=0;i<entity.size()+1;i++){ entity[i]->inWorld=test; - if(entity[i]->type==NPCT&&i>1)NPCp(entity[i])->addAIFunc(giveStuff); } } |