i am currently working on the boarding process of an aircraft in PD. When i try to let the passenger when they are seating, but some1 else is already seating in the same row. The passenger need to wait for x seconds in an waiting area (to simulate the passengers standing up and moving aside for the other passengers.
I currently get the error:
374 Time: 450.799999999998 Atom: Row 1 (ID=470), OnEvent>No atom currently selected: AtomByName()
I have an trigger on entry on the aisle seat and the middle seat
setLabel([Seat], AtomByID(44), 1)
setLabel([Seat], AtomByID(43), 1)
and a waiting area with a service time
if(and(label([Seat],AtomByname([Seat_1D]))=1, label([Seat],AtomByname([Seat_1E]))=1),50,
if(and(label([Seat],AtomByname([Seat_1D]))=1, label([Seat],AtomByname([Seat_1E]))=0),40,
if(and(label([Seat],AtomByname([Seat_1D]))=0, label([Seat],AtomByname([Seat_1E]))=1),30,15)
)
)
How can i select this atom in the 4D script?
no atom selected
Re: no atom selected
Hello,
I think that the reason why your code is currently not working is a missing parameter in the atombyname function. When you use atombyname it is possible to use just 1 parameter, but it is better to include the 2nd parameter as well, e.g.:
I suggets to add the parameter Model (telling PD to search within Model for the atom) in all the atombyname function as well as the atombyid you are using.
Regards, Marlies
I think that the reason why your code is currently not working is a missing parameter in the atombyname function. When you use atombyname it is possible to use just 1 parameter, but it is better to include the 2nd parameter as well, e.g.:
Code: Select all
AtomByname([Seat_1E], Model)
Regards, Marlies