Party coords call
From Unofficial QEdit Wiki Guide
Revision as of 02:51, 26 January 2024 by Pheonixmog (Talk | contribs)
Contents
Syntax
Syntax: party_coords_call register1
- register1 = start of continuous registers.
6 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 = Collision radius from any player within. (In dec.)
6th register = Function to call. (In dec.)
Use
Used to create a script collision that is triggered when a player in the 1st radius comes within the 2nd radius of another player or NPC. It will call the function as long as a minimum of two are within range of each other.
Note: This is a V1 OpCode. It is superseded by players_in_range, which allows greater control of the player requirement with get_number_of_player1.
Example
1: ret
100: call 101 //Calls function 101.
ret
101: leti R1, 0000002D //Makes register 1 equal 0000002D.
leti R2, 00000000 //Makes register 2 equal 00000000.
leti R3, FFFFFF56 //Makes register 3 equal FFFFFF56.
leti R4, 0000001E //Makes register 4 equal 0000001E.
leti R5, 0000000A //Makes register 5 equal 0000000A.
leti R6, 00000066 //Makes register 5 equal 00000066.
party_coords_call R1 //Creates a script collision at register 1 (x position), register 2 (y position), register 3(z position), with a collision radius of register 4 (30), a secondary radius of register 5 (10), and calls function in register 6 (function 102) when at any time two players or NPCs are present.
ret
102: jmpi_= R6, 00000001, 1 //IF register 6 equals 00000001 jump to function 1.
leti R6, 00000001 //Makes register 6 equal 00000001.
window_msg 'Multiple people just stepped in a<cr>script collision made<cr>through scripting.' //Displays a window message.
winend //Closes the window message.
ret