Ir al contenido

Foto

Spawning Useable Placeables and then Destroying them with Dialog


  • Por favor identifícate para responder
8 respuestas en este tema

#1
Sabranic

Sabranic
  • Members
  • 306 mensajes

Currently in the ToH I have some parts of the dungeon cut off by non-static city walls set to block pathing.  If a player SEARCHES the area, (a secret placeable trigger), they will discover a lever, and when that lever is pulled, a conversation starts, in which the wall vanishes, revealing a way forward. 

 

I use the conversation to play amusing mind games with the players - "is this going to make an avalanche of rocks crush me?"  (and a few of them actually do!!), and the player even has the option to make charisma checks to talk a different party member into pulling the lever and reaping the potential bad consequences in their stead.

 

Currently, the lever works properly - the wall and the lid I use to hide the room from the mini-map all vanish on  ga_destroy.  The lever however, does not, despite me having its tag also set to ga_destroy.  Because of this, the player can use it repeatedly and get the dialog - which now does nothing of course.

 

When the floor lever spawns it does not seem to keep the blueprint tag?  How would I go about either stopping the conversation from firing, or more preferably, destroying the lever once it's been successfully used to obliterate the wall and lid?  I've tried changing the ga-destroy target to the waypoint the lever spawns at, thinking that perhaps the lever was picking up IT'S tag on spawn, but no luck. 

 

It's not the end of the world, but it would be a bit more professional to tie up loose ends like that imho.



#2
Tchos

Tchos
  • Members
  • 5.030 mensajes

When you spawn an object, the CreateObject function gives you the option of specifying a tag for the object (if you leave it blank, it should retain the tag the blueprint originally had).  You could specify a special tag for these destroyable levers.


  • A Sabranic le gusta esto

#3
Sabranic

Sabranic
  • Members
  • 306 mensajes

The blueprint of the base floor lever in the toolset, or the tag I assigned the custom floor lever I made?

 

Perhaps I should try assigning a tag on create item.  Nothing I am doing seems to get rid of the levers.  I'll take a shot at that tomorrow. 



#4
kevL

kevL
  • Members
  • 4.052 mensajes
when spawned it gets the default tag that's specified in the exact blueprint that it was spawned from

if you specify sNewTag in CreateObject() the spawned instance overwrites the tag w/ sNewTag. Make it unique and you should be able to identify the lever uniquely, and get it with GetObjectByTag() [searches entire module] or GetNearestObjectByTag() [searches current area only].


ps. The lever might have to falsify its Plot flag also.
  • A Sabranic le gusta esto

#5
kamal_

kamal_
  • Members
  • 5.235 mensajes
You should be able to turn off the plot flag on the lever before destroying as part of the destruction. Tgat will prevent accidentally destroying it.
  • A Sabranic le gusta esto

#6
Tchos

Tchos
  • Members
  • 5.030 mensajes

You could also just set it to be unusable after it's served its purpose, instead of destroying it.


  • A ArtemisJ y a Sabranic les gusta esto

#7
PJ156

PJ156
  • Members
  • 2.979 mensajes

Better I think to go with Tchos's suggestion unless there is a reason for the lever to disappear. Also, with regards making the lever appear could you hide it instead of spawning it. Have the level hidden within another object that you destroy with the search roll. that way the properties of the lever are constant.

 

Possibly not a working solution but just a thought.

 

PJ 


  • A Sabranic le gusta esto

#8
Sabranic

Sabranic
  • Members
  • 306 mensajes

So many great options! 

 

Thank you all!



#9
ArtemisJ

ArtemisJ
  • Members
  • 127 mensajes

I fully support flagging objects usable flag when you are done with them..

It helps the player know what things are important and what aren't.

 

Just be careful.. don't prematurely flag something before they are done with it. :lol:


  • A GCoyote le gusta esto