View Single Post
  #1  
Old 02-04-2021, 02:15 AM
victorhe victorhe is offline
Registered User
 
Join Date: Feb 2021
Posts: 2
Help with code please!

Hey! Sorry for the very basic question, I am very new with coding and Python.
I've created three tasks, each with their own events that execute a certain sequence of actions/movements for an avatar in my environment.
I am trying to design an experimental trial in which one trial will include 1)AttackPhase 2)WanderPhase 3)Wait - in that order.
How can I write a code for this?

#TASKS
def WanderPhase ():
seq = random.choice([RWanderTask, LWanderTask])
viztask.schedule( seq() )

vizact.onkeydown('6',WanderPhase)

def AttackPhase():
seq = random.choice([Male_task_front, Male_task_right, Male_task_left])
viztask.schedule( seq() )

vizact.onkeydown('7',AttackPhase)

def Wait ():
seq = random.choice([Waiting])
viztask.schedule( seq() )

vizact.onkeydown('8',Wait)
Reply With Quote