xvelocity = view.xvelocity;

Game Editor comments and discussion.

xvelocity = view.xvelocity;

Postby phyzix5761 » Sat Dec 31, 2011 4:52 am

view.xvelocity returns a value.

But when I try to assign view.xvelocity to an actor it does not return a value.

Code: Select all

xvelocity = view.xvelocity;



I have this in the actor's draw event. What am I doing wrong?
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: xvelocity = view.xvelocity;

Postby skydereign » Sat Dec 31, 2011 6:50 am

You must be doing something else besides that. Attached is an example of similar code where it works. Perhaps you are setting an actor's variable via global code, like so.
Code: Select all
void
function ()
{
    actor.xvelocity = view.xvelocity;
}

In which case you have run into gE's global code actor variable problem. If that is the case, you can read up a little more on it here. http://game-editor.com/forum/viewtopic.php?f=2&t=10386&p=71270&#p71270
Attachments
xvelocity.ged
(947 Bytes) Downloaded 80 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: xvelocity = view.xvelocity;

Postby phyzix5761 » Sat Dec 31, 2011 7:10 am

Yep, I was setting the value via global code. It works now. Thank you.
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest