[Command] getTarget

Post Reply
User avatar
Raddeck
LP Manager
Reactions: 1
Posts: 508
Joined: Sat Oct 16, 2021 6:22 pm
Location: LpWorld
Contact:

Post by Raddeck »

getTarget()


USE:
Returns Actor
Used for WHO: conditions for interactions, get the current interaction target (i.e. the actor the player just clicked on)


TYPE: Command, Non-Ref
RETURNS: Actor
THEME: Actor Loading
COMPARE:


EXAMPLE:
In lpaction

Code: Select all

WHO: MotorcycleDealer = getTarget(); If ....

In lpscene

Code: Select all

If CarDealer.isValid()
    CarDealerID = CarDealer.getID()
    CarDealer_ID = CarDealerID + Random(1000, 3000)
    CarDealer_ID = CarDealer_ID.round()
    rk_VB_CarDealer_ID.setGlobal(CarDealer_ID)
Else
    CarDealer = generatePerson()
    CarDealer_ID = CarDealer.getID()
    rk_VB_CarDealer_ID.setGlobal(CarDealer_ID)
Endif
Like my work? Buy me a coffee or support me on Patreon to keep it coming. :ugeek:
-Don't PM me for support-
Top
Post Reply