Where is the dam doc ?

Hi guys, I was following the little tuto about creative devices, and tried to replace the item spawner with a door, so when we press the button it opens the dam door.

Apparently the agent passed as argument in the button event doesn’t fit to the agent used by the ToggleOpened() method of trigger_device :

Toggles between Open and Close. Agent is the instigator of the action.

    ToggleOpened<public>(Agent:agent):void = external {}

So that code doesn’t work :
OnButtonInteractedWith(InPlayer:agent) : void =
door.Close(agent)

Not a big deal actually, the thing is, I looked for days and nowhere could I find any documentation that would tell me how to cast the dam agent into agent.

Am I missing something or is it just impossible to do anything for now and we just have to wait for a couple of months / years ?

You’re using the type instead of the var as the param in that function call

Looks like you need to use door.Close(InPlayer)

@TritonSailor is correct that you have to use the variable name InPlayer, not the type agent. If you’re looking for documentation on type casting you can find that here.