Difference between revisions of "Npc check straggle"
Pheonixmog (Talk | contribs) (Created page with "==Syntax== ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:green'>npc_check_straggle </span>register1</span> * ''register1'' = start of contin...") |
(No difference)
|
Latest revision as of 03:22, 26 January 2024
Contents
Syntax
Syntax: npc_check_straggle register1
- register1 = start of continuous registers.
9 registers
1st register = Position x. (In dec.)
2nd register = Position y. (In dec.)
3rd register = Position z. (In dec.)
4th register = Collision radius. (In dec.)
5th register = Function that includes npc_chkwarp. (In dec.)
6th register = Radius around player (in dec.)
7th register = Destination x. (in dec.)
8th register = Destination y. (in dec.)
9th register = Destination z. (in dec.)
Use
Used to create a script collision that checks if the Green slot NPC is outside the Radius around player. It will run the Function that includes npc_chkwarp if the green slot NPC is lagging behind. If true, the NPC will warp to the destination coordinates. Has no effect on other NPCs or Players.
Example
1: ret
100: thread_stg 160 //Threads function 160.
ret
160: leti R60, FFFFF92A //Makes register 60 equal FFFFF92A.
leti R61, 00000000 //Makes register 61 equal 00000000.
leti R62, FFFFF911 //Makes register 62 equal FFFFF911.
leti R63, 00000032 //Makes register 63 equal 00000032.
leti R64, 00000121 //Makes register 64 equal 00000121, Function 289.
leti R65, 00000078 //Makes register 65 equal 00000078.
leti R66, FFFFF9F2 //Makes register 66 equal FFFFF9F2.
leti R67, 00000000 //Makes register 67 equal 00000000.
leti R68, FFFFF911 //Makes register 68 equal FFFFF911.
npc_check_straggle R60 //This example is from The Retired Hunter. If the player is about to
enter the final room of Ruins 3, and Donoph is more than register R65 (120 units) away, function 289 triggers and he
will warp to the opposite side of the room.
ret
289: npc_chkwarp //If triggered, will warp to Destination R66-R68.
ret
Also see
ret, call, leti, npc_crp_V3, npc_chkwarp