Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / need help with "for w= 4 to 100" command

Author
Message
Rico109
15
Years of Service
User Offline
Joined: 2nd Dec 2008
Location: none-of-your-beeswax!!!!! (lol)
Posted: 1st Jan 2009 21:08
ok, so my player has 4 limbs, and if the player's limb colides with one of the 100 trees that I have placed, It needs to stop, not go through the trees!!!!!

here is my code: (using "if intersect object" command for collisions)



plz!!!!! I really need this!!!!!
Guyra
18
Years of Service
User Offline
Joined: 10th Nov 2005
Location: Norway
Posted: 2nd Jan 2009 05:36 Edited at: 2nd Jan 2009 05:48
Well, to get you started, place the "next w" code after the "set object transparency p, 2" code. Then add a second "for w=4 to 100" code before the intersection check, and a second "next w" after, and place the intersection check code(with the second for-next parts containing it) inside your main loop, or else it will only work at the same time as the trees are created, which is a millisecond, or something.


Rico109
15
Years of Service
User Offline
Joined: 2nd Dec 2008
Location: none-of-your-beeswax!!!!! (lol)
Posted: 2nd Jan 2009 17:13 Edited at: 2nd Jan 2009 17:23
uhh, I didn't have a "set object transparency" code...

anyway, it didn't work! my person also keeps wiggling arround and it goes through the trees!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2009 04:42
you dont want the next w... just "next"

also - make sure your limb code is straight - I thought there was limb world position also - which makes sense possibly for what your trying to do here.

Rico109
15
Years of Service
User Offline
Joined: 2nd Dec 2008
Location: none-of-your-beeswax!!!!! (lol)
Posted: 3rd Jan 2009 17:47
"limb world position"????? say wha?

sorry, I'm kinda new here (maybe I should buy the book).

anyway, I'm a little bussy right now, so I'll try the "next" thing latter.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2009 18:31
yeah .. I dunno how well those commands work - but you know how you position objects in world space - with x,y,z... I think Limb Position is x,y,z relative to the model, where limb world postion is the x,y,z's of where that limb is actually in the (world) scene.

I'm not positive - but look in the Basic3D help section.

--Jason

Rico109
15
Years of Service
User Offline
Joined: 2nd Dec 2008
Location: none-of-your-beeswax!!!!! (lol)
Posted: 3rd Jan 2009 21:37
I did position the limbs, combine them with my character, etc.

anyway, it doesn't work!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2009 21:39
That tells me a lot... major lack of effort... walking away for the moment I am...

Rico109
15
Years of Service
User Offline
Joined: 2nd Dec 2008
Location: none-of-your-beeswax!!!!! (lol)
Posted: 3rd Jan 2009 21:48

why me?


Maybe I'm just not good with forum stuff...

People always jump to the wrong conclusions...

Anyway, I am giving this a lot of effort!!!!! (I'm only in my first year of highschool for cryin out loud)

Plus, this is my first experience coding like this!

I'm used to the easy Drag and Drop functions of Game Maker 7.0!

This is completely foreign to me!!!!!

PS- sorry about my explosion, just a little frustrated. I'm used to understanding things right away, even things that I know will take a long time to learn (like DBpro).
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2009 22:23
Good... as long as you're shedding some blood... here's a hint...

We can't help you if you don't give us more information - some code - explain some things you tried - what happens - upload a screen shot - maybe with some arrows drawn on the screen shot ... number them.. then refer to them in your post...

Programming is frustrating - but it shouldn't make you lose your hair - walk away come back... chill.. or just keep banging on it - as its pretty much how it goes - for me - for you - for everyone...

I started coding at 10... so don't give age as an excuse - just work at it - it gets easier!

So post some code - show whats going on - what you want to do - and myself or someone else will have an easier time helping ya - but remember - if you're to frustrated to work it - why should we be patient for some other persons project? Out of the goodness of our hearts if you're lucky...

So do what I said and your post will get more attention I promise!!!!

--Jason

Rico109
15
Years of Service
User Offline
Joined: 2nd Dec 2008
Location: none-of-your-beeswax!!!!! (lol)
Posted: 4th Jan 2009 02:56
thanx for the tips!

Login to post a reply

Server time is: 2024-09-28 00:28:01
Your offset time is: 2024-09-28 00:28:01