The Dink Network

another moving problem

December 4th 2005, 10:14 AM
slayer.gif
RANKN67
Peasant He/Him
 
im having a problem with this script....
i want the guard to move but it doesnt the part where the problem is after: say_stop("`#arrrrrghhh fine u may pass becose of ur stupiddity.", &current_sprite);

PS- i know tkhat the diallogue is crappy

void main( void )
{

void talk( void )
{

freeze(1);
choice_start();
"Hello"
"wat r u doin there"
(&story == 0) "can u let me go in?"
(&story == 1) "could u move too?"
"Leave"
choice_end();

if (&result == 1)
{

freeze(1);
say_stop("Hello.", 1);
wait(200);
say_stop("`#Hello.", &current_sprite);
unfreeze(1);
}

if (&result == 2)
{

freeze(1);
say_stop("wat r u doin tehre", 1);
wait(200);
say_stop("`#to keep people like u out.", &current_sprite);

unfreeze(1);
}

if (&result == 3)
{
if (&story == 0)
{

unfreeze(1);
say_stop("can u let me go by?", 1);
wait(200);
say_stop("`#no u have to say the magic word?", &current_sprite);
wait(200);
say_stop("I have no idea.",1);
wait(200);
say_stop("`#Perhaps you could say please?", &current_sprite);
wait(200);
say_stop("What woman?", 1);
wait(200);
say_stop("`#ur realy dum!!.", &current_sprite);
wait(200);
say_stop("Sure, why not. I could use a walk.", 1);
wait(200);
say_stop("`#arrrrrghhh fine u may pass becose of ur stupiddity.", &current_sprite);
int &crap = sp(5);
move_stop(&crap, 4, 85, 1);
move_stop(&crap, 8, 45, 1);

say_stop("`#tehre u go.", &current_sprite);
wait(200);
say_stop("thanks!!", 1);
wait(200);
say_stop("`#<wat an idiot>.", &current_sprite);

}
}

unfreeze(1);
&story = 1;

if (&result == 3)
{
if (&story == 1)
{


say_stop("can u move too??", 1);
wait(200);
say_stop("`#sure", &current_sprite);
wait(200);


move_stop(&current_sprite, 4, 49, 1);

move_stop(&current_sprite, 8, 45, 1);

unfreeze(1);
}

}
}
}
December 4th 2005, 11:21 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
void main( void )
{
//nothing here, just leave it out completely, or at least use a closing bracket
}

void talk( void )
{
//dialogue with choices and all that...
}

Now beware, you've made a mistake with your choice things. Let's take a closer look:

choice_start();
"Hello"
"wat r u doin there"
(&story == 0) "can u let me go in?"
(&story == 1) "could u move too?"
"Leave"
choice_end();

You added two
if (&result == 3)
lines in it. The answer, don't.

"Hello" --> &result is 1
"wat r u doin there" --> &result is 2
"can u let me go in?" --> &result is 3
"could u move too?" --> &result is 4
"Leave" --> &result is 5

The value of &result depends on the choice if all choices would be visible, so if all the conditions are true.

Fix these things first, and then see if it works
December 4th 2005, 11:21 AM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
Okay, this should be pretty easy. Get rid of int &crap = sp(5);, as it is completely unnecessary (and generally a pretty bad way to do things).

Change
move_stop(&crap, 4, 85, 1);
move_stop(&crap, 8, 45, 1);


to

move_stop(&current_sprite, 4, 85, 1);
move_stop(&current_sprite, 8, 45, 1);
December 4th 2005, 12:20 PM
slayer.gif
RANKN67
Peasant He/Him
 
I did both things but didnt work, this is wat the script looks like now,

note- desided to show the script cus i wanted to know if i did the rite changes

void main( void )
{

void talk( void )
{

freeze(1);
choice_start();
"Hello"
"wat r u doin there"
(&story == 0) "can u let me go in?"
(&story == 1) "could u move too?"
"Leave"
choice_end();

if (&result == 1)
{

freeze(1);
say_stop("Hello.", 1);
wait(200);
say_stop("`#Hello.", &current_sprite);
unfreeze(1);
}

if (&result == 2)
{

freeze(1);
say_stop("wat r u doin tehre", 1);
wait(200);
say_stop("`#to keep people like u out.", &current_sprite);

unfreeze(1);
}

if (&result == 3)
{
if (&story == 0)
{

unfreeze(1);
say_stop("can u let me go by?", 1);
wait(200);
say_stop("`#no u have to say the magic word?", &current_sprite);
wait(200);
say_stop("I have no idea.",1);
wait(200);
say_stop("`#Perhaps you could say please?", &current_sprite);
wait(200);
say_stop("What woman?", 1);
wait(200);
say_stop("`#ur realy dum!!.", &current_sprite);
wait(200);
say_stop("Sure, why not. I could use a walk.", 1);
wait(200);
say_stop("`#arrrrrghhh fine u may pass becose of ur stupiddity.", &current_sprite);
move_stop(&current_sprite, 4, 85, 1);
move_stop(&current_sprite, 8, 45, 1);
say_stop("`#tehre u go.", &current_sprite);
wait(200);
say_stop("thanks!!", 1);
wait(200);
say_stop("`#<wat an idiot>.", &current_sprite);

}
}

unfreeze(1);
&story = 1;

if (&result == 4)
{
if (&story == 1)
{


say_stop("can u move too??", 1);
wait(200);
say_stop("`#sure", &current_sprite);
wait(200);


move_stop(&current_sprite, 4, 49, 1);

move_stop(&current_sprite, 8, 45, 1);

unfreeze(1);
}

}
}
}
December 4th 2005, 02:05 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
You don't need the &story checks within the &result checks, but they shouldn't be causing the problem. Next up, I still see the void main( void ). Get rid of it. You shouldn't nest two procedures (things like void main( void ), void talk( void ), etc). In your case, the talk procedure (void talk( void )) is inside the main procedure (void main( void )).

By the way, what is

unfreeze(1);
&story = 1;

doing between result 3 and 4?

Meh, except for those things, I see no real scripting error just now.
December 4th 2005, 02:24 PM
spike.gif
The guy doesn't have sp_base_walk(); or sp_speed();

Without the latter he won't move at all, and without the first he won't have a walk animation.
December 5th 2005, 06:48 PM
slayer.gif
RANKN67
Peasant He/Him
 
to scratcher,

but the sprite i want to move is a sprite i made in the editor so why would i need to add that

update!!

i figured it out thanks scratcher, i didnt add the base walk and speed in the editor thank u every one for the input
December 5th 2005, 06:59 PM
slayer.gif
RANKN67
Peasant He/Him
 
another problem,

i got the people to move but when they move there hard box stays where it
December 5th 2005, 07:28 PM
spike.gif
Put draw_hard_sprite(&current_sprite); after he's moved
December 5th 2005, 08:04 PM
slayer.gif
RANKN67
Peasant He/Him
 
ok did it but it didn't work should it look like this??....................

move_stop(&current_sprite, 4, 85, 1);
move_stop(&current_sprite, 8, 45, 1);
Put draw_hard_sprite(&current_sprite);
December 5th 2005, 08:34 PM
slayer.gif
RANKN67
Peasant He/Him
 
some oen help
December 5th 2005, 08:56 PM
duck.gif
Tal
Noble He/Him United States
Super Sexy Tal Pal 
You don't actually put the word "Put," heh. it's just "draw_hard_sprite(&current_sprite);" without quotations.
December 5th 2005, 09:02 PM
slayer.gif
RANKN67
Peasant He/Him
 
lol im and idiot
thnx
by the way i am a disgrace to this website
December 5th 2005, 09:06 PM
duck.gif
Tal
Noble He/Him United States
Super Sexy Tal Pal 
Don't worry. You're not the only one.
December 5th 2005, 09:12 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Actually, draw_hard_sprite only *adds* hardness to a scene. To remove hardness, you have to use draw_hard_map();