Thanks for the information! I'll look into gtbot's scripts, and can figure the rest out myself.
As I continue to dig relentlessly deeper into ph3, I'm running into trouble with detecting the collection of user-defined items. I've got this for a simple item script:
task CreateLeaf(x, y) {
let turnSpeed = 10;
let angle = 0;
let item = CreateItemU1(T_ITEM_LEAF, x, y, 0);
ObjItem_SetRenderScoreEnable(item, false);
ObjItem_SetDefinedMovePatternA1(item, ITEM_MOVE_TOPLAYER);
while(!Obj_IsDeleted(item)) {
angle += turnSpeed;
ObjRender_SetAngleZ(item, angle);
yield;
}
}
The item appears and behaves as expected, moves towards the player while spinning, and disappears upon contact with them. However, no event is generated. The player's @Event isn't called at all. I tried using a NotifyEvent(playerID, EV_USER, params) call, but still nothing. How do I make my item trigger an event when collected?