Author Topic: Hide spawnedobjects :o  (Read 7975 times)

KptnKook

  • Posts: 45
  • Immersive or DIE!!!!!
    • View Profile
Hide spawnedobjects :o
« on: August 20, 2013, 04:47:33 PM »
So, the hide function won't work on the spawnobjects script.

i need a spawned wall, which immediately gets invisible and blocks the path with its collision.
how can i hide spawned objects afterwards?

greats

Juschlan

  • Posts: 75
  • I like trains.
    • View Profile
Re: Hide spawnedobjects :o
« Reply #1 on: August 20, 2013, 07:35:51 PM »
Isn't there a "hide object" script? That should do exactly what you want: an invisible wall

KptnKook

  • Posts: 45
  • Immersive or DIE!!!!!
    • View Profile
Re: Hide spawnedobjects :o
« Reply #2 on: August 20, 2013, 09:31:09 PM »
when the object gets spawned by the script whilst the game and not prior, then i can't link to it, since the only relation i have to it is the script, which is not compatible with hideobject script, which only connects to objects as its name says.


its not about spawning invisible walls. its about a spawned object from a spawnscript, which i dont know how to manipulate, since it's not there yet.

greets

KptnKook

  • Posts: 45
  • Immersive or DIE!!!!!
    • View Profile
Re: Hide spawnedobjects :o
« Reply #3 on: August 20, 2013, 09:36:44 PM »
 ;) anyway,i now have made a new asset, which is basically a hitable square. i tried to copy the script of the .xml of a basic destructible wall and changed the coordinates accordingly.

i don't know what i did wrong, but the area is not hitable, like it's supposed to be, since it is the same script like the destructible_dst_wall. the script of my square looks like this:

Quote

<doodad aobias="0.4" minimap="menus/minimap.xml:h_8" defaultlayer="25">
   <sprite scale="16">
   <texture>effects/mod_effects.png</texture>
   <origin>8 8</origin>
   <frame>16 0 16 16</frame>
   </sprite>
      
   <polygon collision="false" shadow="false">
   <point>20 0</point>
   <point>30 0</point>
   <point>20 10</point>
   <point>30 10</point>
   </polygon>         
      
   <polygon collision="false" shadow="false">
      <point>20 0</point>
      <point>30 0</point>
      <point>20 10</point>
      <point>30 10</point>
   </polygon>      
   
   <polygon collision="false" shadow="false">
      <point>20 0</point>
      <point>30 0</point>
      <point>20 10</point>
      <point>30 10</point>
   </polygon>         

</doodad>

did i miss anything? how can i get this square hitable, so that i can trigger it?

thanks
« Last Edit: August 21, 2013, 02:04:12 AM by KptnKook »

Myran

  • Developer
  • Posts: 183
    • View Profile
Re: Hide spawnedobjects :o
« Reply #4 on: August 21, 2013, 04:21:08 PM »
For the first thing that's actually possible, if you connect a HideObject so it runs right after the SpawnObject and then when you are in the mode where you pick an object to hide you can right click the SpawnObject and pick Last spawned.
For an object to be hitable it needs collision, so you need to set collision to true for your polygon.

KptnKook

  • Posts: 45
  • Immersive or DIE!!!!!
    • View Profile
Re: Hide spawnedobjects :o
« Reply #5 on: August 21, 2013, 04:38:10 PM »
 8) ::) great! thank you so much.

Linaru

  • Moderator
  • Posts: 113
  • That Collectable coin is mine!
    • View Profile
Re: Hide spawnedobjects :o
« Reply #6 on: August 24, 2013, 12:18:28 PM »
So, the hide function won't work on the spawnobjects script.

i need a spawned wall, which immediately gets invisible and blocks the path with its collision.
how can i hide spawned objects afterwards?

greats

why not just use a hide object and toggle physics script together to turn the wall on and off?
-----------------------------------------------------------
Stabaddey Stabaddey Zap
-----------------------------------------------------------

KptnKook

  • Posts: 45
  • Immersive or DIE!!!!!
    • View Profile
Re: Hide spawnedobjects :o
« Reply #7 on: August 25, 2013, 09:30:42 PM »
i dont know all the scripts. now i know, thank you for the hint!