Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

RPG in a Box

Bring your stories and ideas to life! · By Justin Arnold

[0.3.5.8] Script editor saving bug

A topic by lectronice created Nov 11, 2016 Views: 81 Replies: 5
Viewing posts 1 to 6

Hi!

I'm in the process of scripting various doors, curtains, and other similar objects, and I'm using this kind of script:

if self.property["open"] == true then
  play_animation(self, "close");
  set_entity_property(self, "open", false);
  modify_navigation("t_-6_-2_-1", "t_-7_-2_-1", 1);
  modify_navigation("t_-7_-4_-1", "t_-7_-3_-1", 3);
  modify_navigation("t_-7_-3_-1", "t_-7_-2_-1", 3)
else
  play_animation(self, "open");
  set_entity_property(self, "open", true);
  modify_navigation("t_-6_-2_-1", "t_-7_-2_-1", 3);
  modify_navigation("t_-7_-4_-1", "t_-7_-3_-1", 1);
  modify_navigation("t_-7_-3_-1", "t_-7_-2_-1", 1)
end

And while it works fine, apparently it forces the use of "pending" navigation every time I save instead of the "no interaction" navigation. It's not visible unless the script is closed and reloaded.

Hey there, thanks for the bug report! I've found the issue and will include a fix in the next update. The problem is related to the way I have the values ordered in the dropdown box vs. the corresponding numeric codes for each type, specifically Pending and None, so it selects the incorrect value from the dropdown upon initializing the editor.

Saving the script works fin now :) However, I still have a problem, which is probably the intended behavior. Since my doors are bigger than a single tile (20x32) in order to open them completely and align them correctly with the walls, its seems they can be activated if the player is inside their "grid perimeter" even if the tiles he's standing on are set to "no interaction". Which means the player can close the door on himself, so the door overlaps with his model.

I suppose any big object with a part inside a tile on which the player is standing can be interacted with, even if the path between the player and the tile he's facing is set to "no interaction"? Or is it a bug?

That sounds like a bug to me if I am understanding correctly - if the object only spans the one tile, the player shouldn't be able to interact with it in that case, even if part of it hangs over the edge of the tile that it's on.

Would you mind sending me the project, or maybe an simple example of it? A screenshot of the way it's laid out in the Map Editor may suffice, also.

I've just sent you an email with an attached file.

Thanks! That helped a lot. I think it may actually be working as intended since the player is on one of the door's tiles and my logic assumes you can interact if standing on a tile that the interactive object is also on - basically as you suggested in the last part of your post:

I suppose any big object with a part inside a tile on which the player is standing can be interacted with, even if the path between the player and the tile he's facing is set to "no interaction"?

I'll have to come up with some way of handling cases like this where you shouldn't be able to interact. I will think over it some more and figure out a good approach.