smartguy240 |
// **************************************************************** Something is wrong here... I know this because this wont work! What is wrong is: 1) Everything(lol) 2) When I type in BOW, the parser says I do not understand your request ( YES BOW IS IN MY WORDS.TOK FILE) 3)When I enter the room, my Ego cannot move around. just pivot on a 4 turned axis. 4) I probabally worte the flags wrong since I really dont work with them much. 5) I always have this problem.....grrrrrr...... ::) |
Robin_Gravel |
Logic 0 should not used as a room. Logic 0 is used for general scripting. Use logic 1 or another logic to make the game to work. Robin Gravel |
smartguy240 |
Robin, this is Logic.12. Thanks for being so observive though. SMG240 |
Joel |
it looks like your if statement for "bow" is inside the if-statement for "speak"...ultimately, the structure of the code you pasted is this if (said("speak")) { if (said("bow")) { } } since these are pretty much mutually exclusive conditions, the stuff inside if (said("bow")) will never execute |
Joel | also, for some reason the portion of the code that says "ADD ADDITIONAL INITIALIZATION CODE HERE" appears outside of the if (new_room) block...I'm guessing that comment was generated by version 1 of the Base Logic Generator, in which case you must have moved it outside of the new_room block yourself. Anyway, that's why ego can't move. It's the same problem as in the "Animating objects" thread. |
Joel |
To clarify that, the problem is that you keep executing a position command every interpreter cycle, so every time ego should move it's being repositioned back to its starting position. Here is how your logic should look to fix all the problems you're having:
// ****************************************************************
//
// Logic 0: Alteeda has lost her bow
//
// ****************************************************************
#include "defines.txt"
#define tree o1
#define bow o2
if (new_room)
{
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
animate.obj(o2);
load.view(34);
set.view(o2,34);
set.loop(o2,0);
set.cel(o2,0);
position(o2,21,59);
set.priority(o2,4);
draw(o2);
animate.obj(o1);
load.view(33);
set.view(o1,33);
set.loop(o1,0);
set.cel(o1,0);
position(o1,63,90);
set.priority(o1,8);
start.cycling(o1);
draw(o1);
//ADD ADDITIONAL INITIALIZATION CODE HERE
if (prev_room_no == 10)
{
position(o0, 62, 152);
} // end if (prev_room_no == 10)
draw(o0);
show.pic();
} // end if (new_room)
if (ego_edge_code == bottom_edge)
{
//ADD ADDITIONAL BOTTOM EXIT CODE HERE
new.room(10);
} // end if (ego_edge_code...)
if (f2 && unknown_word_no == 0 && !input_parsed)
{
if (said("look"))
{
print("You see a Giant Tree");
} // end if (said("look"))
if(said("speak"))
{
if(isset(f104))
{
print("Thank you for finding my bow!");
} // end if (isset(f104))
else
{
print("*Sniffle*");
print("I have lost my blue bow. It blew off during a storm.");
print("It couldn't have gone far, could you find it for me?");
} // end else
} // end if (said("speak"))
if(said("bow")) {
print("You get the bow and put it on Alteeda!");
print("Thank You so much!");
set.loop(o1,1);
erase(o2);
get(i9);
print("For finding my bow, you may have my green coins!");
set(f104);
} // end if said("bow"))
// I don't think you want the following if-statement;
// I'm commenting it out
/*
if(f104) {
set.loop(o1,1);
erase(o2);
} // end if (f104)
*/
} // end if (f2 && unknown_word_no...)
return();
|