Script - Need X & Y values given to another instance properties

screenbert I've created a view (view 008) that is a transport view of the ego character. Then when ego uses the communicator to "transport" I hide ego and init the transport, which needs to grab the current ego position and viola! he's gone. However due my years since using C I'm very rusty on the syntax. I can't seem to pull the ego properties for x and y. Let me know if there is any other information I am missing. Here are the two pieces of applicable code:

(if(Said('use/communicator'))
(if(send gEgo:has(INV_COMM))
(send gEgo:hide(1))
(Transport:init())
(Transport:setLoop(1) cycleSpeed(1) setCycle(End))
Print("Beam me up Scotty!")
Wait(180)
send gRoom:newRoom(3)
)
(else
Print("You don't have a communicator.")
)

(instance Transport of Prop
(properties
/* y 150
x 130 */
y gEgo(properties(y))
x gEgo(properties(x))
view 008
)
)
cloudee1 Uhm I'm not sure what you are saying here.

If the charactar is changing screens by transport couldn't you just init the ego in room three at any arbitrary point why does it need to be in the same position.

oldx, oldY, ohp wait I think I understand now, the problem is that the transporter animated view doesn't know where to position.

Try something like this instead:


(if(Said('use/communicator'))
(if(send gEgo:has(INV_COMM))
programControl()
(send gEgo:view(008)loop(1)cycleSpeed(1)setCycle(End))
Print("Beam me up Scotty!")
Wait(180) // does wait work?
(send gRoom:newRoom(3))
)
(else
Print("You don't have a communicator.")
) // ends INV check
) // ends Use Com



I'm not sure if the wait command will work here, but otherwise since you are hiding the ego, instead you can just change the view.
screenbert That works great as long as I don't send ego to the next room. If I send him to the next room, he goes there before he disappears using the new view which "transports" him. The wait does indeed wait, but it does not allow the view to cycle through. Any ideas on that one?
screenbert Ok I didn't get an answer so I spent hours pulling my hair, catching up on the basics. I've found my solution and I have to admit I've learned more than if someone had just handed me the answer.

I'm sure there are other ways of doing it using the same basic logic, but here is what I did. Down below under method (doit) I added this and took out the send gRoom used with the code that changed the view:

(if(== (send gEgo:view) 008 and == (send gEgo:cel) 9)
(send gRoom:newRoom(3))
)