PlayerMemSet

From PGE Wiki
Jump to navigation Jump to search

Prototype

PlayerMemSet,-,OFFSET,VALUE,OPERATION,Active time,DATA SIZE

Description

Sets the memory of player 1. OFFSET is the memory of the player you want to change. Check the reference at the bottom of the document for some known memory offsets. OPERATION is the way you want to manipulate the memory (adding to it, multiplying from it, subtracting from it...) VALUE is what the value that OPERATION will perform on. DATA SIZE is the type of data in the player's memory. Check the reference at the bottom of the document to find the data size.

Notes

There are 6 types of OPERATION to be performed on VALUE: OPERATION = 0 = Assign. VALUE will be set. OPERATION = 1 = Add. VALUE will be added to the current value. OPERATION = 2 = Subtract. VALUE will be subtracted from the current value. OPERATION = 3 = Multiply. The current value will be multiplied by VALUE. OPERATION = 4 = Divide. The current value will be divided by VALUE. OPERATION = 5 = XOR. The current value will have a bitwise exclusive-or operation performed on it against VALUE.

There are 5 types of DATA SIZE that can be set b = byte (1 byte of memory) w = word (2 bytes of memory) dw = double word (4 bytes of memory) f = float / decimal (4 bytes of memory) df = double float / double precision decimal (8 bytes of memory)

Examples

// Player sparkles permanently
PlayerMemSet,0,0x02,1,0,0,w