The Dink Network

Blockingscript

July 18th 2006, 07:24 PM
milder.gif
I am searching for a blocking script attached to a fence when &story == 1 Dink can't enter part of the game because the fence is blocking it. But when &story == 3 Dink must can enter that area.

Can somebody help me????????

It doesn't matter if the fence has been seen in the playermap or not. As long as the way is blocked for a while and later open for playing further.

PLEASE HELP?
July 18th 2006, 07:39 PM
wizard.gif
Chrispy
Peasant He/Him Canada
I'm a man, but I can change, if I have to.I guess. 
Can't you kill the &currentsprite = whatever when dink enters the screen and &story = 3?
July 18th 2006, 07:41 PM
milder.gif
There is no &currentsprite in that screen only a passage where dink only can enter when &story is at least equal ==3
July 18th 2006, 07:46 PM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
If you want the fence to go away then this works.

if (&story == 3)
{
sp_hard(&current_sprite, 1);
draw_hard_map(&current_sprite);
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
{
//this was placed by the editor, lets make the barrel stay flat
editor_type(&hold, 1);
}
sp_active(&current_sprite, 0);
}
July 18th 2006, 07:50 PM
milder.gif
When I am using this script above am I seeing the fence when &story is not ==3 or am I not?????
July 18th 2006, 07:52 PM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
Yes if you place the fence with the editor and attach the script everything works. Or did you want something else?
July 18th 2006, 07:59 PM
milder.gif
No this will work just fine. Thank you, Thank you Thank you. I will name you in my credits file.
July 18th 2006, 08:10 PM
milder.gif
Are the only things I have to attach to my fence hardness 0 and script block1.c I am right?

But when I want to attach a texture line

Such as I can't enter yet. How can I manage that?

Oh, and Erwin you're already named in the credits file of my DMOD.

July 18th 2006, 08:14 PM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
You mean making the fence hard via the editor? Oh thanks for naming me in the credits altough it wasn't a big favor at all.
July 19th 2006, 05:02 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Well you could add:

void talk(void)
{
say("I can't enter yet",1);
}

But if you want to do that on touch:

void main(void)
{
if (&story == 3)
{
//let's destroy the fence here:
sp_hard(&current_sprite,1);
draw_hard_map();
sp_active(&current_sprite,0);
}
sp_touch_damage(&current_sprite,-1);
}

void touch(void)
{
say("I can't enter yet.",1);
}

Oh and sorry for editing your part of the script Erwin, but the &hold part would cause the fence to disapear forever and I'm not sure that's what dinkholland is after... If you do want that use Erwin's script between the if (&story == 3) part.
July 19th 2006, 04:59 PM
milder.gif
I found another one.

THis one I do use I don't see the fence and when I touch it it says something.

//If you want the fence to go away then this works.

void main (void)
{
if (&story <= 3)
{
sp_touch_damage(&current_sprite, -1);
sp_nodraw(&current_sprite, 1);

}
}

void touch (void)
{
say("I am not ready yet.", 1);
move_stop(1, 8, 74, 1);
}