VIEW Artisting---Then inserting it into my game!!

smartguy240 Does anyone know a special way to draw VIEWS for things like a guy with a sword that is slinging it? I have 5 different Views(*cels...Sorry 7/23/02) 1. Upright with sword in hand 2. Right leg foward with sword at a 45 degree angle 3. Sword straight at a 90 degree angle with right leg slightly out more. 4. Same as 2 5. Same as 1 I think that it really looks stupid but it will have to work! So now what do I do to have a sword fight between EGO and O1? I want EGO to go up and say "SPEAK", and then the dude says "DO YOU HAVE A SWORD?" And then if you type "YES" you fight him and if you type "NO" you dont fight him... so here is the breakdown EGO says SPEAK O1 asks DO YOU HAVE A SWORD EGO chooses YES or NO if YES then EGO changes to view 48 if YES then O1's view changes to view 49 if YES then EGO moves to 100,105 if YES then O1 moves to 105,105 if YES then O1 and EGO animate their views in turns (4) if YES then O1 changes his view to 50 (he is dead!) if YES then sound 255 plays if YES then the O1 is erased from the screen forever after you recieve I9-Swordman's Green Coins If NO O1 says COME SEE ME WHEN YOU DO Does anyone know how to put this all into LOGIC? I would really appreciate it if anyone could help me! THAnKS SMG240
Joey I think it would be something like this:

if (said("speak")) {
print("Do you have a sword?");
print("Say yes or no.");
}
if (said("Yes")) {
erase(o0);
erase(01);
load.view(48);
set.view(o0,48);
load.view(49);
set.view(o1,49);
move.obj(o48,100,105,1,f60);
move.obj(o49,105,105,1,f61);
animate.obj(o48);
animate.obj(o49);
end.of.loop(o48,f62);
end.of.loop(o49,f63);
}
if (f62);
start.cycling(o48);
}
if (f63);
erase(o49);
load.view(50);
set.view(o49,50);
load.sound(what ever sound it is. for example 50);
sound(50,f64);
}
if (f64);
erase(o50);
get(I9-Swordmans Green Coins);
}


This code should work but may have some bugs. If it does tell me and ill fix the code.

Good Luck!

Joey whoops i forgot something.

if (said("no")) {
print("Come see me when you do.");
}


you can place that code where ever you want.
smartguy240 Ok....I will see how it works! Thanks!

SMG240
smartguy240 I changed it to this:

if (said("speak")) {
print("Do you have a sword?");
print("Hint: Say YES or NO");
}
if (said("Yes")) {
erase(o0);
erase(o10);
load.view(48);
set.view(o0,48);
set.loop(o0,3);
load.view(49);
set.view(o10,49);
set.loop(o10,0);
move.obj(o0,100,105,1,f60);
move.obj(o10,105,105,1,f61);
animate.obj(o0);
animate.obj(o10);
end.of.loop(o0,f62);
end.of.loop(o10,f63);
}
if (f62){
start.cycling(o0);
}
if (f63){
erase(o10);
load.view(50);
set.view(o10,50);
load.sound(50);
sound(50,f64);
}
if (f64){
erase(o10);
get(i8);
set.view(o0,0);
}

if (said("no")) {
print("Come see me when you do.");
}
}
return();
But when you say, SPEAK, it says I DO NOT UNDERSTAND YOUR REQUEST.

I know it probabally has to do with the } 's because my problem is ALWAYS with the } 's !!

So... can anyone help me with this?

SMG240
Joey did you put the work speak in the words.tok file.
you know you go into words.tok editor in AGI Studio.
And by the way, whats the name of your game?
just wondering.

-Joey
smartguy240 I have about 9 forms of speak in my Words.tok file

So far my game is very plottless and it is called Patrick's Quest AGI Because I have Patrick's Quest on RPG Maker 95 and 2000!

If anyone has a good plot for me, I could give it a try!

SMG240
P.S. Did you see what was wrong else with my edited version of the Sword person?
Joey if you did put it in words.tok I think you messed something up. you put
erase(o10);
i thought it was o1 that was going to be erased. I think the reason it is saying i do not understand your request is because there is a bug in the code. the erase(o10); may be it. and make sure that view 1 is already in the screen when you play it.
Joey also you put set.loop(o0,3); and a lot of other things with o0. i think it is not going to understand that because o0 is now 48. i think you'd have to do set.loop(o48,3); and the same with move.obj(48,.....
and all the other code that involves you except erase(o0); try that and get back to me.
Joey did it work?
smartguy240 Well, o0 is my ego and o10 is the man with the sword.

I think that o0 stays o0 even if it changes views because i have o0 in my defines.txt as my ego and I have o10 on the top of my page of logic as the man.
Loop3 on view 48 is the loop I want to animate. Loop 0 on view 49 is the loopI want to animate... I have had this happen before on things where i tried to talk to someone in my game after I changed something and I got a message saying I DO NOT UNDERSTAND YOUR REQUEST. Maybe we should check the }'s and the other parts, the compiler reads it, and says that it complied successfully, but I cant talk to the friggin man!

I dont know what is wrong


Smg240
Joey i think i figured it out. there is an extra { at the end of the file. get rid of the { before return();
if it says { expected at end of file, then there is a bug in the code. i will keep looking for the bug
Joey well.......
did it work?
smartguy240 It must be a bug because it said that } wasnt at the end of any command blocks.

SMG240
AGI1122 Could you show me the entire logic? I think I know what the problem is but for me to be sure I would need to see the whole thing.

Joey, the bug isn't in the code displayed, but I beleive the bug is where he put the code you gave him. If he put it in the spot I think he did then it would not work... so just show me the entire logic so I can see what is going on.
smartguy240 Well, I will have to send it in a minute, it is on my downstairs computer---back in a few...

SMG240
smartguy240 // ****************************************************************
//
// Logic 10
//
// ****************************************************************

#include "defines.txt"
#define man o10

if (new_room)
{
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(13);

animate.obj(o10);
load.view(23);
set.view(o10,23);
set.loop(o10,0);
set.cel(o10,0);
position(o10,132,63);
ignore.horizon(o10);
ignore.blocks(o10);
ignore.objs(o10);
wander(o10);
draw(o10);



//ADD ADDITIONAL INITIALIZATION CODE HERE

if (prev_room_no == 3)
{
position(o0, 8, 88);
}

if (prev_room_no == 9)
{
position(o0, 78, 166);
}
if (prev_room_no == 12)
{
position(o0, 79, 19);
}

if (prev_room_no == 11)
{
position(o0, 158, 84);
}
}


draw(o0);
show.pic();


if (ego_edge_code == horizon_edge)
{
//ADD ADDITIONAL HORIZON EXIT CODE HERE
new.room(12);
}

if (ego_edge_code == bottom_edge)
{
//ADD ADDITIONAL BOTTOM EXIT CODE HERE
new.room(9);
}

if (ego_edge_code == left_edge)
{
//ADD ADDITIONAL LEFT EXIT CODE HERE
new.room(3);
}

if (ego_edge_code == right_edge)
{
//ADD ADDITIONAL RIGHT EXIT CODE HERE
new.room(11);
}
if (f2 && unknown_word_no == 0 && !f2)
{ if (said("look"))
{
print("You see a crossroads.");
}

if (said("speak")) {
print("Do you have a sword?");
print("Hint: Say YES or NO");
}
if (said("Yes")) {
erase(o0);
erase(o10);
load.view(48);
set.view(o0,48);
set.loop(o0,3);
load.view(49);
set.view(o10,49);
set.loop(o10,0);
move.obj(o0,100,105,1,f60);
move.obj(o10,105,105,1,f61);
animate.obj(o0);
animate.obj(o10);
end.of.loop(o0,f62);
end.of.loop(o10,f63);
}
if (f62){
start.cycling(o0);
}
if (f63){
erase(o10);
load.view(50);
set.view(o10,50);
load.sound(50);
sound(50,f64);
}
if (f64){
erase(o10);
get(i8);
set.view(o0,0);
}

if (said("no")) {
print("Come see me when you do.");
}
}

return();

Thats it... I am off to bed now.... it is 11:47 here!!

I really appreciate this.

SMG240
AGI1122 It was just as I though, use this:

// ****************************************************************
//
// Logic 10
//
// ****************************************************************

#include "defines.txt"
#define man o10

if (new_room)
{
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(13);

animate.obj(o10);
load.view(23);
set.view(o10,23);
set.loop(o10,0);
set.cel(o10,0);
position(o10,132,63);
ignore.horizon(o10);
ignore.blocks(o10);
ignore.objs(o10);
wander(o10);
draw(o10);



//ADD ADDITIONAL INITIALIZATION CODE HERE

if (prev_room_no == 3)
{
position(o0, 8, 88);
}

if (prev_room_no == 9)
{
position(o0, 78, 166);
}
if (prev_room_no == 12)
{
position(o0, 79, 19);
}

if (prev_room_no == 11)
{
position(o0, 158, 84);
}
}


draw(o0);
show.pic();
}

if (ego_edge_code == horizon_edge)
{
//ADD ADDITIONAL HORIZON EXIT CODE HERE
new.room(12);
}

if (ego_edge_code == bottom_edge)
{
//ADD ADDITIONAL BOTTOM EXIT CODE HERE
new.room(9);
}

if (ego_edge_code == left_edge)
{
//ADD ADDITIONAL LEFT EXIT CODE HERE
new.room(3);
}

if (ego_edge_code == right_edge)
{
//ADD ADDITIONAL RIGHT EXIT CODE HERE
new.room(11);
}
if (f2 && unknown_word_no == 0 && !f2)
{ if (said("look"))
{
print("You see a crossroads.");
}

if (said("speak")) {
print("Do you have a sword?");
print("Hint: Say YES or NO");
}
if (said("Yes")) {
erase(o0);
erase(o10);
load.view(48);
set.view(o0,48);
set.loop(o0,3);
load.view(49);
set.view(o10,49);
set.loop(o10,0);
move.obj(o0,100,105,1,f60);
move.obj(o10,105,105,1,f61);
animate.obj(o0);
animate.obj(o10);
end.of.loop(o0,f62);
end.of.loop(o10,f63);
}
if (f62){
start.cycling(o0);
}
if (f63){
erase(o10);
load.view(50);
set.view(o10,50);
load.sound(50);
sound(50,f64);
}
if (f64){
erase(o10);
get(i8);
set.view(o0,0);
}

if (said("no")) {
print("Come see me when you do.");
}

return();
Joey DAMN CHRIS!!!
lol
i thought i knew how to help him. lol
anyway.
smg240, tell us if it works

-joey
smartguy240 Ok... I will try it out now!!

(I see you have 2 stars now Joey! Great job!)

SMG240
smartguy240 Well... Um... it did the same thing as before...

the } on line 55 said that it wasn't at the end of and command blocks, so I had to move it to the bottom...

???

SMG240
Joey what do the stars mean?
Joey the code should work.....
well im goin to the rainforest resteraunt.
ill review the code after.
oh and a message to everyone:
Date Quest 2 is about 20% done. screen shots are posted at http://joekool224.tripod.com
only 1 is there now but more shall be there by the end of the day.
AGI1122 Hmmm that should have fixed it, the problem I found was that it was in the new_room if and if it is in there then it would only be called once and not work... there must be another bug in the code if it didn't work.
AGI1122 Alright, I have done you a favor and have searched the code, formatted it, and fixed it. This is a possitive fix, I have checked it thouroughly and fixed 2 other bugs which where in the code I gave you earlier(and in the code you posted).

// ****************************************************************
//
// Logic 10
//
// ****************************************************************

#include "defines.txt"
#define man o10

if (new_room)
{
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(13);

animate.obj(o10);
load.view(23);
set.view(o10,23);
set.loop(o10,0);
set.cel(o10,0);
position(o10,132,63);
ignore.horizon(o10);
ignore.blocks(o10);
ignore.objs(o10);
wander(o10);
draw(o10);

//ADD ADDITIONAL INITIALIZATION CODE HERE

if (prev_room_no == 3)
{
position(o0, 8, 88);
}

if (prev_room_no == 9)
{
position(o0, 78, 166);
}

if (prev_room_no == 12)
{
position(o0, 79, 19);
}

if (prev_room_no == 11)
{
position(o0, 158, 84);
}

draw(o0);
show.pic();
}

if (ego_edge_code == horizon_edge)
{
//ADD ADDITIONAL HORIZON EXIT CODE HERE
new.room(12);
}

if (ego_edge_code == bottom_edge)
{
//ADD ADDITIONAL BOTTOM EXIT CODE HERE
new.room(9);
}

if (ego_edge_code == left_edge)
{
//ADD ADDITIONAL LEFT EXIT CODE HERE
new.room(3);
}

if (ego_edge_code == right_edge)
{
//ADD ADDITIONAL RIGHT EXIT CODE HERE
new.room(11);
}

if (said("look")) {
print("You see a crossroads.");
}

if (said("speak")) {
print("Do you have a sword?");
print("Hint: Say YES or NO");
}

if (said("Yes")) {
erase(o0);
erase(o10);
load.view(48);
set.view(o0,48);
set.loop(o0,3);
load.view(49);
set.view(o10,49);
set.loop(o10,0);
move.obj(o0,100,105,1,f60);
move.obj(o10,105,105,1,f61);
animate.obj(o0);
animate.obj(o10);
end.of.loop(o0,f62);
end.of.loop(o10,f63);
}

if (said("no")) {
print("Come see me when you do.");
}

if (f62){
start.cycling(o0);
}

if (f63){
erase(o10);
load.view(50);
set.view(o10,50);
load.sound(50);
sound(50,f64);
}

if (f64){
erase(o10);
get(i8);
set.view(o0,0);
}

return();
smartguy240 Ok Thanks! I will giveit a whirl!!
SMG240 ;D
smartguy240 // ****************************************************************
//
// Logic 10
//
// ****************************************************************

#include "defines.txt"
#define man o10

if (new_room)
{
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(13);

animate.obj(o10);
load.view(23);
set.view(o10,23);
set.loop(o10,0);
set.cel(o10,0);
position(o10,25,149);
ignore.horizon(o10);
ignore.blocks(o10);
ignore.objs(o10);
draw(o10);

//ADD ADDITIONAL INITIALIZATION CODE HERE

if (prev_room_no == 3)
{
position(o0, 8, 88);
}

if (prev_room_no == 9)
{
position(o0, 78, 166);
}

if (prev_room_no == 12)
{
position(o0, 79, 19);
}

if (prev_room_no == 11)
{
position(o0, 158, 84);
}

draw(o0);
show.pic();
}

if (ego_edge_code == horizon_edge)
{
//ADD ADDITIONAL HORIZON EXIT CODE HERE
new.room(12);
}

if (ego_edge_code == bottom_edge)
{
//ADD ADDITIONAL BOTTOM EXIT CODE HERE
new.room(9);
}

if (ego_edge_code == left_edge)
{
//ADD ADDITIONAL LEFT EXIT CODE HERE
new.room(3);
}

if (ego_edge_code == right_edge)
{
//ADD ADDITIONAL RIGHT EXIT CODE HERE
new.room(11);
}

if (said("look")) {
print("You see a crossroads.");
}

if (said("speak")) {
print("Do you have a sword?");
print("Hint: Say YES or NO");
}

if (said("Yes")) {
load.view(48);
load.view(49);
load.view(50);
load.sound(50);
position(o0,20,149);
position(o10,25,149);
erase(o0);
set.view(o0,48);
draw(o0);
set.loop(o0,0);
set.view(o10,49);
set.loop(o10,0);
start.cycling(o0);
start.cycling(o10);
animate.obj(o0);
set.dir(o0,v3);
animate.obj(o10);
animate.obj(o0);
animate.obj(o10);
stop.cycling(o0);
stop.cycling(o10);
end.of.loop(o0,f50);
end.of.loop(o10,f51);
}
if(f50) {
erase(o0);
animate.obj(o0);
animate.obj(o0);
animate.obj(o0);
set.view(o0,0);
get(i8);
draw(o0);
}
if(f51) {
erase(o10);
start.cycling(o10);
animate.obj(o10);
animate.obj(o0);
animate.obj(o0);
stop.cycling(o10);
load.view(50);
set.view(o10,50);
draw(o10);
}
if (said("no")) {
print("Come see me when you do.");
}

return();


I re wrote this using what Chris had fixed and I put some things in to get it how I wanted and I came up with this! There are only 4 things I need help on after this had been written.

1. I can say yes infinite number of times... I only need it once!!

2. I am trying to put v3 += 3; (for adding points) in there but every where I put it, the counter shoots up ti 275 and goes back to zero continueously (sp?).

3. When I say "YES" the Ego goes to a new position but there is a shell of him left where I said YES. i can walk over the shell and it dissappears.

4. My EGO anly animates when I move him in a direction. I want it to animate by itself while o10 is animating!

THanks for helping me guys.

SMG240
Joey I had the same problem in date quest 2.
i forget the code i did cause its up stairs on my pc.
that should work though. ummmm.......
let me go get the code. ill send it to u in a couple min.
Joey if (said("use spray")) {
if (has("breath spray")) {
print("Ok.");
v3 += 2;
print("You quickly run into the grass, where no one is looking and apply the spray.");
program.control();
erase(o0);
animate.obj(o5);
load.view(5);
set.view(o5,5);
set.cel(o5,0);
set.loop(o5,0);
draw(o5);
start.cycling(o5);
end.of.loop(o5,f230);

}
else {
print("You don't have it.");
}
}
if (f230) {
print("No wonder that breath spray was only 99 cents. Your all out already.");
print("Atleast you'll have good breath for the rest of the game.");
drop("breath spray");
player.control();
erase(o5);
load.view(0);
set.view(o0,0);
position(o0,6,61);
draw(o0);
player.control();
accept.input();
reset(f230);
}




this code worked for me, but you'll have to change some stuff for your game.
Joey // ****************************************************************
//
// Logic 10
//
// ****************************************************************

#include "defines.txt"
#define man o10

if (new_room)
{
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(13);

animate.obj(o10);
load.view(23);
set.view(o10,23);
set.loop(o10,0);
set.cel(o10,0);
position(o10,25,149);
ignore.horizon(o10);
ignore.blocks(o10);
ignore.objs(o10);
draw(o10);

//ADD ADDITIONAL INITIALIZATION CODE HERE

if (prev_room_no == 3)
{
position(o0, 8, 88);
}

if (prev_room_no == 9)
{
position(o0, 78, 166);
}

if (prev_room_no == 12)
{
position(o0, 79, 19);
}

if (prev_room_no == 11)
{
position(o0, 158, 84);
}

draw(o0);
show.pic();
}

if (ego_edge_code == horizon_edge)
{
//ADD ADDITIONAL HORIZON EXIT CODE HERE
new.room(12);
}

if (ego_edge_code == bottom_edge)
{
//ADD ADDITIONAL BOTTOM EXIT CODE HERE
new.room(9);
}

if (ego_edge_code == left_edge)
{
//ADD ADDITIONAL LEFT EXIT CODE HERE
new.room(3);
}

if (ego_edge_code == right_edge)
{
//ADD ADDITIONAL RIGHT EXIT CODE HERE
new.room(11);
}

if (said("look")) {
print("You see a crossroads.");
}

if (said("speak")) {
print("Do you have a sword?");
print("Hint: Say YES or NO");
}

if (said("Yes")) {
if(f89){
print("you already fought him");
}
else {
program.control();
load.view(48);
load.view(49);
load.view(50);
load.sound(50);
position(o0,20,149);
position(o10,25,149);
erase(o0);
set.view(o0,48);
draw(o0);
set.loop(o0,0);
set.view(o10,49);
set.loop(o10,0);
start.cycling(o0);
start.cycling(o10);
animate.obj(o0);
set.dir(o0,v3);
animate.obj(o10);
animate.obj(o0);
animate.obj(o10);
stop.cycling(o0);
stop.cycling(o10);
end.of.loop(o0,f50);
end.of.loop(o10,f51);
set(f89);
}
}
if(f50) {
erase(o0);
animate.obj(o0);
animate.obj(o0);
animate.obj(o0);
set.view(o0,0);
get(i8);
draw(o0);
}
if(f51) {
erase(o10);
start.cycling(o10);
animate.obj(o10);
animate.obj(o0);
animate.obj(o0);
stop.cycling(o10);
load.view(50);
set.view(o10,50);
draw(o10);
}
if (said("no")) {
print("Come see me when you do.");
}

return();
smartguy240 Ok thnkx, the only problems no is:

1 One was that the shell of EGO was still there when I said yes

2. You forgot player.control(); LOL!!

3. And I had to press a directional key for EGO to animate while in view 48!

THNKS
smartguy240 Ok thnkx, the only problems no is:

1 One was that the shell of EGO was still there when I said yes

2. You forgot player.control(); LOL!!

3. And I had to press a directional key for EGO to animate while in view 48!

THNKS
smg240