View unanswered posts | View active topics It is currently Tue Apr 23, 2024 5:39 pm



Reply to topic  [ 6 posts ] 
 Vectors/Disappear 
Author Message
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1359
Location: USA
Reply with quote
Post Vectors/Disappear
Ok, two things i need assistance with:

1.)
Code:
 actor.Pos = self.Pos;
How do i make the actor position 5 pixels to the left/right of self.Pos?

2.) i have an actor that disappears on a map after crossing a certain line on every map. Then once you cross it and walk the other way, he reappears.

Thanks :)


Tue Jun 02, 2009 8:51 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Vectors/Disappear
For #1, you can separate the vector into two parts.
actor.Pos.X = self.Pos.X (+, -) 5;
actor.Pos.Y = self.Pos.Y;

I have no idea what would cause #2, what's in the code?


Tue Jun 02, 2009 9:04 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1359
Location: USA
Reply with quote
Post Re: Vectors/Disappear
Duh102 wrote:
For #1, you can separate the vector into two parts.
actor.Pos.X = self.Pos.X (+, -) 5;
actor.Pos.Y = self.Pos.Y;

I have no idea what would cause #2, what's in the code?


rather not say, because im going to be releasing it soon, but according to skiv, its the xwrap where its disappearing, so i dont know if it can be fixed

btw: thanks for the help with vectors ;)


Tue Jun 02, 2009 9:07 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1359
Location: USA
Reply with quote
Post Re: Vectors/Disappear
Sorry for the double post, but i'd rather make it a new post so last post is updated:

With UInputMan, instead of the action occuring every time the key is pressed, including when it is held down, is it possible to make it so you have to individually press the key every time for the action to occur?


Tue Jun 02, 2009 9:38 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Vectors/Disappear
make it set a variable to true on keypress and the false when the key is released, and the action only happen when the variable is false


Tue Jun 02, 2009 10:00 pm
Profile WWW
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1359
Location: USA
Reply with quote
Post Re: Vectors/Disappear
is there a variable for key released, though?

edit: doh im dumb: (UInputMan:KeyReleased())


Tue Jun 02, 2009 10:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.048s | 15 Queries | GZIP : Off ]