Jump to content

Photo

need help with script for setting robot conscious/unconscious via term


  • Please log in to reply
16 replies to this topic

#11
viking99

viking99

    Enthusiast

  • Members
  • PipPip
  • 228 posts
It would be interesting to see the solution. I have a similar problem. I want to set a npc unconscious until a certain encounter has happened.

I have a staged encounter where a npc is to be injured an set unconscious. Instead of him waking up immediatly after the fight he is supposed to be out until another objective has been set.

I have solved the issue by killing and resurecting the npc but the resurected npc fall/sink into the ground any ideas?

#12
rickerhk

rickerhk

    Resident poster

  • Premium Member
  • 2,958 posts

I have solved the issue by killing and resurecting the npc but the resurected npc fall/sink into the ground any ideas?


Unfortunately, Resurrect 1 causes that problem. Resurrect 0 doesn't, but it's a complete reset of the NPC.

#13
stevie70

stevie70

    Fan

  • Banned
  • PipPipPip
  • 484 posts

It would be interesting to see the solution. I have a similar problem. I want to set a npc unconscious until a certain encounter has happened.

sure, on the terminal,
set VegasBabyMisterHealthyREF.iMisterHealthy to 1
VegasBabyMisterHealthyREF.setUnconscious 0
for activating it (wherein vegasbabymisterhealthyref is the reference-id of the robot and iMisterHealthy is my variable for the robot state, 0=off, 1=on), deactivating is just the other way around (setUnconscious 1 and imisterhealthy to 0), and the terminal item has a condition asking for GetUnconscious of the robot (1=unconscious makes the turn-on-option appear and 0=conscious makes the turn-off-option appear).

and on the robot there's
begin OnLoad
	if iMisterHealthy == 0
     evp
      setUnconscious 1
	endif
end
which just sets the robot unconscious on load if it's currently turned off (the evp is just for running a package that makes it go to it's home location before it turns off). if you don't need such a thing and just want to remotely set it unconscious once, i think you wouldn't need any script on the robot (and something like the iMisterhealthy-variable at all, i'm pretty sure
VegasBabyMisterHealthyREF.setUnconscious 1
alone on the terminal with nothing on the robot would do for that.

Edited by stevie70, 01 April 2011 - 12:20 AM.


#14
viking99

viking99

    Enthusiast

  • Members
  • PipPip
  • 228 posts
thanks guys both those solutions will be helpfull. :-)

#15
stevie70

stevie70

    Fan

  • Banned
  • PipPipPip
  • 484 posts
just got the mod online now (without starting quest yet, enough scripting for that bit of a house for now :-),
would be happy if you checked it out and told me what you think, the name is vegas, baby...

#16
viking99

viking99

    Enthusiast

  • Members
  • PipPip
  • 228 posts

just got the mod online now (without starting quest yet, enough scripting for that bit of a house for now :-),
would be happy if you checked it out and told me what you think, the name is vegas, baby...


Judging from the pictures it looks pretty good is it fully navmeshed and follower friendly? You can always expand it with a little quest later.

#17
stevie70

stevie70

    Fan

  • Banned
  • PipPipPip
  • 484 posts

Judging from the pictures it looks pretty good is it fully navmeshed and follower friendly? You can always expand it with a little quest later.

thanks :-)
yes, all navmeshed of course, and tons of idle markers for your followers.
the only thing about it is, with more than one follower plus dog, it gets crowded quite easily (it's just a bungalow after all, y'know...) ;-)




Page loaded in: 1.216 seconds