|
Post by Xenith on Nov 7, 2007 17:05:58 GMT -5
PMed you the link. It's a little messy (everything), but that's mostly how I work. Also, i didn't disable the player controls.So that means when you press left or right, the character is going to be moving around( I'll fix that later ). I have one question though, why are you so cool Ism?
|
|
|
Post by IsmAvatar on Nov 7, 2007 19:44:07 GMT -5
Because I have so many fans (get it? ha ha)
|
|
|
Post by Xenith on Nov 8, 2007 14:10:16 GMT -5
You have so many fans because you're cool ;D ;D.
|
|
|
Post by Xenith on Nov 10, 2007 0:51:24 GMT -5
Sorry, for this double post. I'm only doing it because if I edited my last post, it wouldn't say "NEW" on the front page (I don't think) Anyways, I think this is about done now. Aside from a few things. How do I make it so if I press left or right the inventory won't stop spinning until the next object is in the reticle? I have it set up so that if I press a left or right it adds or subtracts .1 from or to the object's position. I want to get it so that if I press right it'll add .1 ten times (if I just put in +1, it wouldn't look like it was spinning). I'd like it to spin and then stop once it reaches a whole number. Sorry if my explanation's a little off and for my lack of time to work on this, I'm a little sleepy so I'll post back tomorrow.
|
|
|
Post by IsmAvatar on Nov 10, 2007 15:53:03 GMT -5
You need 2 variables. 1 is the destination rotation (kinda like the conjunction junction), while the other is the current rotation. So the destination rotation is the angle that you want it to land on. This is the one you change when you press left/right. The current rotation is just changed every step, so that it's .1 closer to the destination.
|
|
|
Post by Xenith on Nov 10, 2007 18:44:06 GMT -5
//dpad=0 means neither left or right //dpad=1 means left //dpad=2 means right if (not Controls_icon.position=0 or not Actions_icon.position=0 or not Weaponlvl_icon.position=0 or not Status_icon.position= 0 or not Analyze_icon.position=0 or not Equip_icon.position=0 or not Msgbox_icon.position=0) {if dpad=1 { if Controls_icon.position<=0 {Controls_icon.position=6.9} else {Controls_icon.position-=.1} if Actions_icon.position<=0 {Actions_icon.position=6.9} else {Actions_icon.position-=.1} if Weaponlvl_icon.position<=0 {Weaponlvl_icon.position=6.9} else Weaponlvl_icon.position-=.1 if Status_icon.position<=0 {Status_icon.position=6.9} else Status_icon.position-=.1 if Analyze_icon.position<=0 {Analyze_icon.position=6.9} else Analyze_icon.position-=.1 if Equip_icon.position<=0 {Equip_icon.position=6.9} else Equip_icon.position-=.1 if Msgbox_icon.position<=0 {Msgbox_icon.position=6.9} else Msgbox_icon.position-=.1 }}
if (not Controls_icon.position=0 or not Actions_icon.position=0 or not Weaponlvl_icon.position=0 or not Status_icon.position= 0 or not Analyze_icon.position=0 or not Equip_icon.position=0 or not Msgbox_icon.position=0) { if dpad=2 { if Controls_icon.position>=6.9 {Controls_icon.position=0} else {Controls_icon.position+=.1} if Actions_icon.position>=6.9 {Actions_icon.position=0} else {Actions_icon.position+=.1} if Weaponlvl_icon.position>=6.9 {Weaponlvl_icon.position=0} else Weaponlvl_icon.position+=.1 if Status_icon.position>=6.9 {Status_icon.position=0} else Status_icon.position+=.1 if Analyze_icon.position>=6.9 {Analyze_icon.position=0} else Analyze_icon.position+=.1 if Equip_icon.position>=6.9 {Equip_icon.position=0} else Equip_icon.position+=.1 if Msgbox_icon.position>=6.9 {Msgbox_icon.position=0} else Msgbox_icon.position+=.1 }} if (Controls_icon.position=0 or Actions_icon.position=0 or Weaponlvl_icon.position=0 or Status_icon.position= 0 or Analyze_icon.position=0 or Equip_icon.position=0 or Msgbox_icon.position=0) {dpad=0}
How come when I press the right button it cycles then stops like it is supposed to? But when I press left it cycles infinitely. I guess I messed up with the <=0 or something.
|
|
|
Post by IsmAvatar on Nov 11, 2007 12:47:58 GMT -5
I don't think you can use "not" in that way and expect it to work. I believe it would evaluate "not Controls_icon.position" first, and then evaluate the equality.
Instead, you need the inequality sign, "!="
so Controls_icon.position!=0
|
|
|
Post by Xenith on Nov 11, 2007 16:13:22 GMT -5
Hmm.. I removed all the "not"'s and change "=" to "!=". It still turns out the same way.When I press the right button it'll do what it's supposed to.But when I press left it won't stop it's cycling. Is "<0" even possible? I think that might be where I went wrong. Got any ideas to fix this, boss?
|
|
|
Post by Alexander_Q on Nov 22, 2007 23:13:34 GMT -5
I don't understand any of this stuff yet, but I'm getting there. From the sounds of it, it would be better to just use images than make new objects to represent the menu. Is there a way to change variables based on what .gif sub-image an animation is at? You could even use that rotating menu gif if that were the case.
|
|
|
Post by Xenith on Nov 23, 2007 20:13:40 GMT -5
I thought of doing that, but I'd rather have it programmed instead of having to get a gif of the inventory rotating with only a candy and chocolate, or a walnut and some other object. I almost had this done, but I kinda lost the energy to continue on after a while.I'll try to get this done soon. BTW Ism is my idol.
|
|
|
Post by Alexander_Q on Nov 24, 2007 6:45:20 GMT -5
Yeah, it wouldn't work for any other menu, but for the menu that remains constant, it's possible. Then again, if you get the code happening for the other menus, there's no reason not to apply it everywhere.
|
|