Jump to content
  • 0

[Resolved : Use setcell] Problem using Setwall in Instances


Angst

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  97
  • Reputation:   20
  • Joined:  11/13/11
  • Last Seen:  

Solution:

Set Unwalkable:

setcell has_instance("mapname"),x1,y1,x2,y2,cell_walkable,0;

Delete Unwalkable:

setcell has_instance("mapname"),x1,y1,x2,y2,cell_walkable,1;


Does setwall and/or setcell not work in instance script?

I've tried to get it to work yet it doesn't seem to want to. u_u

I've tried doing this:

 setwall "1@grcat",64,102,4,2,0,"GRcatBigRM";

And then because the above didn't work I tried setting it by instance map name by doing this:

if (instance_id() <= 999 && instance_id() >= 100) {set .@mid$, instance_id();}
if (instance_id() <= 99 && instance_id() >= 10) {set .@mid$, "0"+instance_id();}
if (instance_id() <= 9) {set .@mid$, "00"+instance_id();}
setwall .@mid$+"1@grcat",64,102,4,2,0,"GRcatBigRM";

The instance_id one, would set map name to "0011@grcat" which is the first instance, because I'm the only player on my test server; there is only one copy of the map, being 0011@

All of the other instance script works perfectly, just not setwall/setcell :)

Also all the instance requirements are setup, mapcache, resnametable, etc.

This is the npc that handles the setwall script in my instance, for reference.

1@grcat,66,103,0 script #grwall 844,2,2,{
end;
OnTouch:
unittalk $@talk,"There's a strange barrier here keeping me from moving forward.. I think I see something glowing in the room ahead.";
specialeffect 757;
specialeffect 757;
end;
OnInstanceInit:
if (instance_id() <= 999 && instance_id() >= 100) {set .@mid$, instance_id();}
if (instance_id() <= 99 && instance_id() >= 10) {set .@mid$, "0"+instance_id();}
if (instance_id() <= 9)   {set .@mid$, "00"+instance_id();}
setwall .@mid$+"1@grcat",64,102,4,2,0,"GRcatBigRM";
}
Edited by Angst
  • Upvote 1
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.   Paste as plain text instead

  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.

×
×
  • Create New...