Jump to content
  • 0
Aeromesi

Unwalkable cell in Instance

Question

So I've been banging my head on how to do this for a while now. Basically I'm trying to set an unwalkable cell within an instance, I've successfully done it, but it effects the original map "yuno_fild02" as well, I tried with if(has_instance) and if(instance_id) etc, but to no avail it doesn't work...

Here's my code for the "working" one that effects the original map as well as the emulated instanced map:

-	script	setwallcake	-1,{	end;OnInit:	setwall "yuno_fild02",89,185,7,6,false,"cakewall";}



This is my instance version that loads no errors but doesn't work:

-	script	setwallcake	-1,{	end;OnInstanceInit:if (has_instance("yuno_fild02", .@instance)) { {	setwall "yuno_fild02",89,185,7,6,false,"cakewall";}}}


Any help on this?

The instanced map is 1@cake by the way. Not sure if that's needed, but that's the emulation name.

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

@@Aeromesi

 

Did you emulate the map? You need to use the emulated name not the original map name. Also you did use .@instance which is nowhere defined in that script.

You can omit the variable since it will use the instance it is currently attached to. You also had atleast one pair of {} too many.

-	script	SetCakeWall	-1,{	OnInstanceInit:		if ( has_instance("EMULATED_MAP_NAME" ) )			setwall "EMULATED_MAP_NAME", 89, 185, 7, 6, false, "cakewall";	end;}

Share this post


Link to post
Share on other sites
  • 0

OnInstanceInit won't be executed.

Since it executes on the map of instance.

You have map as none...

Also you need to use emulated name for setwall, but original map name for npc.

Share this post


Link to post
Share on other sites
  • 0
yuno_fild02,0,0,0    script    setwallcake    -1,{    end;OnInstanceInit:	setwall strnpcinfo(4),89,185,7,6,false,"cakewall";	end;}

Share this post


Link to post
Share on other sites
  • 0

How i do to set command "delwall" in other label?

Por example:

 

OnInstanceInit:setwall strnpcinfo(4),89,185,7,6,false,"cakewall";

for now, i want to delete wall when mob are died, like this:

OnMyModDead:delwall "cakewall";end;

but, this command on other label is not works

script make a wall normal, but don't delete wall in other label...

 

ps: sorry my bad english '-'

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.