Author Topic: Is it possible to spawn or show a script shape when the player hits a button?  (Read 5681 times)

MrCuddles

  • Posts: 14
  • Maggot Crusher.
    • View Profile
I want to have the player walk down a dead-end corridor, hit a button at the end. Then the corridor they just walked down has a doodad, shape and areatrigger added to it which teleports the player to another area.

I can work out how to spawn or show objects but not script shapes. Any suggestions on how to do this?

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
You can use the Circle Shape and SquareShape scripts to make a shape/area, then have those triggers like Area Trigger to point to them.


Enjay

  • Posts: 47
  • Maggot Crusher.
    • View Profile
What Pwnography said is correct, just rewording it a bit.
Essentially, you already have the shape there, so you don't have to spawn it.

So you walk down the corridor, pass over the shape that will eventually teleport you, it checks to see if a variable is equal to something, it isn't, and nothing happens. You hit the button, it spawns the doodads, and changes the variable to whatever it should be. Now you walk back, again it checks to see if the variable is equal to whatever, and now it is, so it teleports you.

Edit: I don't quite know what you mean by showing the shape, if what you want is to show the players that the shape is there, I imagine it's possible with a show effect, and then making a custom effect that is the rectangle? I feel like that's probably not what you want, but if it is, hey, there you go.
Every time I post I get nervous because I feel like the devs are judging me.

MrCuddles

  • Posts: 14
  • Maggot Crusher.
    • View Profile
Thanks this is a much better solution. For some reason I did not think of setting a variable I was approaching it from the point of view that I need to spawn the shape but of course I could have the shape there but inactive until variable condition is met.

Thanks for kicking me in the right direction.

So far I love this editor. It has some problems but is otherwise easy to use.

While I have this thread open is there any way to select a doodad that is underneath another doodad without first moving the top level doodad out of the way?

Thanks

Enjay

  • Posts: 47
  • Maggot Crusher.
    • View Profile
I haven't found any way, but it's usually not too much trouble to just shove it out of the way for a bit while working. I usually make any scripted doodads away from the actual level, and just drag them over when the scripting is done.
Every time I post I get nervous because I feel like the devs are judging me.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
While I have this thread open is there any way to select a doodad that is underneath another doodad without first moving the top level doodad out of the way?

The easiest way is to click the doodad on top, press the "H" key on the keyboard to temporarily 'hide it'. Select/adjust the doodad you wish, and then to bring back all
'hidden doodads' press shift+h. Let me know if that's helpful :D

MrCuddles

  • Posts: 14
  • Maggot Crusher.
    • View Profile
While I have this thread open is there any way to select a doodad that is underneath another doodad without first moving the top level doodad out of the way?

The easiest way is to click the doodad on top, press the "H" key on the keyboard to temporarily 'hide it'. Select/adjust the doodad you wish, and then to bring back all
'hidden doodads' press shift+h. Let me know if that's helpful :D

very helpful thanks  8)