Author Topic: Getting properties from classes  (Read 2104 times)

0 Members and 1 Guest are viewing this topic.

Joe

  • Guest
Getting properties from classes
« on: June 29, 2002, 07:34:26 PM »
This will probably be an easy (and possibly idiotic/obvious) question, but how to I assign a variable the Ego's x and/or y variables?  In other words, how do I get the Ego's position, and put it into a variable?



Offline Brian Provinciano

Re:Getting properties from classes
« Reply #1 on: June 29, 2002, 07:44:34 PM »
You can do something like this:
Code: [Select]
(var theEgosX)

// ex. Getting the ego's X
= theEgosX (send gEgo:x)

// ex. Setting the ego's X to 10
(send gTheEgo:x( 10 ))

You can see how stuff like that is done in the examples above. However, never try to set the ego's x and y like that, use the procededure provided with the template.

By the way, the tutorial explains how to do that. Please read it in it's entirety. When done, you'll know SCI like the back of your hand!
« Last Edit: June 29, 2002, 07:45:09 PM by Brian Provinciano »

Joe

  • Guest
Re:Getting properties from classes
« Reply #2 on: June 29, 2002, 07:47:20 PM »
Yes.  I'm afraid I skipped most of the tutorial, but now I will read it thoroughly.  Thank you.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.049 seconds with 21 queries.