Jump to content


Photo

Scripting action SetHomeLocation


  • Please log in to reply
4 replies to this topic

#1 Kevin Dorner

Kevin Dorner
  • Member
  • 185 posts

Posted 26 May 2003 - 09:15 PM

SetHomeLocation(P:Point*) - 261

Why I ask: Depending on what this thing does esp. if it sounds like it's doing what it does, this could be the cause of the bug with Hendak disappearing from the Copper Coronet. I tried all the usual resources and they have squat on this action. It's pretty rare; no other char. who remains throughout the game seems to use it.

In the first of several of his move actions in HENDAK.BCS is:

SetHomeLocation([32.120])

This is a totally invalid point to set anything to as it's off the accessible area of AR0406 in the upper left corner, in black nothingness. It never gets changed later either, when he arrives behind the counter where he should remain for the remainder of the game.

So given that HENDAK.BCS parks him at a location 526.1193 and there or thereabouts he should stay, barring moving a few pixels away to beat up Lehtinan, wondering when this "home" location would come into play to call him "home" to the void.

#2 Cuv

Cuv

    Area Maker (retired)

  • Modder
  • 925 posts

Posted 27 May 2003 - 12:16 AM

Heya Kevin:D Nice to see you back

I have never used SetHomeLocation() myself, but I've read through the script several times to get a feel for what is happening there. Forgive me... just going to think outloud for a moment. The first block looks like a safety feature to skip all the moving he does IF Letinin is already dead when you release him

IF
Global("HendakFight","AR0406",0)
Dead("Lehtinan") // Copper Coronet
Global("HendakReleased","AR0406",2)
THEN
RESPONSE #100
SetGlobal("HendakFight","AR0406",1)
SetGlobal("HendakReleased","AR0406",2)
SetGlobal("HendakMove","AR0406",6)
JumpToPoint([526.1193])
END

The variable SetGlobal("HendakReleased","AR0406",2) and SetGlobal("HendakReleased","AR0406",3) are set via his dialog when you unlock the door to his cell depending on the dialog path.

The block in question:

IF
Global("HendakReleased","AR0406",2)
Global("HendakMove","AR0406",0)
!Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
SetHomeLocation([32.120])
MoveToPointNoInterrupt([2599.615])
SetGlobal("HendakMove","AR0406",1)
END

This makes no sense to me. Hendak has already been let out of his cell and is prime to start his move under the Global("HendakReleased","AR0406",2) path. There is nothing remarkable about this block other than the SetHomeLocation([32.120]). It is identical to the next block which is triggered by Global("HendakReleased","AR0406",3). Both have him starting at his cell and moving to 2599.615 and beginning the move cycle to Letinan.

As for the location at [32.120]... this isnt totally useless. A creature cannot appear there by a JumpToPoint, The Search Map will prevent that. I've looked over the search map, and that location is, like you say, totally in the void. But, a JumpToPoint outside of the search area will place the creature at the nearest searchable point within the Search Map... so I dont think that SetHomeLocation does that. It is probably some kind of marker that gives him a home region... but really not sure.

I would suggest either moving the SetHomeLocation coordinates to a place within the search map... or removing it and seeing what happens.

IF
Global("HendakReleased","AR0406",2)
Global("HendakMove","AR0406",0)
!Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
MoveToPointNoInterrupt([2599.615])
SetGlobal("HendakMove","AR0406",1)
END

Not sure it this helps you at all. Good luck with this bug fix

Cuv

#3 Dyara

Dyara
  • Member
  • 262 posts

Posted 27 May 2003 - 02:15 AM

If you have a save with lost Hendak then you can open it with NI and check if he´s at that location. (of course most likely you already know that).

It is possible to save the game during Hendak's 'MoveToPointNoInterrupt([2599.615])'? What happens when you reload? Perhaps 'SetHomeLocation([32.120])' should make sure that Hendak appears at the right location after reload (unfortunately the coordinates are wrong)?

#4 Kevin Dorner

Kevin Dorner
  • Member
  • 185 posts

Posted 27 May 2003 - 08:48 AM

Thanks for the replies! :)

The only save someone sent with this problem has Hendak halfway to the back area where the cells are, in the doorframe. This would seem to indicate what Cuv was saying that he was seeking his "home" point but was unable to reach it.

Someone on Ironworks just posted on this and their Hendak completely vanished so have high hopes for a save with it. I am going to run through it with SetHomeLocation pointing to the location that Hendak should arrive at when he finishes his wanderings.

I know that sometimes the engine misses checking impassible areas because I have seen it in playtesting. One of the areas that is impassible is the map in the Planar Sphere. I needed to test vampire domination for a long time but didn't want to get whacked so CLUA'ed a bunch of vampires and then Ctrl-J'ed the PC to the centre of the map where they "couldn't" reach me. Well, occasionally if the engine was too busy with other things it would forget to check the impassibility and one would run right across the "impassible" area to get to the PC. So it might still be possible for Hendak to at least make it out of the visible/accessible area to reach that far-off home point in the void.

#5 MadSkills

MadSkills
  • Member
  • 8 posts

Posted 24 June 2003 - 06:05 PM

I'm missing Hendak and I could easily send you a save game. I noticed this forum is a few months old so has this been fixed?

Thanks!