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.

DarkBASIC Discussion / automatically moving characters

Author
Message
Element
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location: United States
Posted: 31st Dec 2002 00:29
Ok, im trying to get an effect so your code is able to move a certain amount of objects by themselves without me moving them with a keypress or mouseclick....heres the code I have created so far:



I havent worked on it too long due to me being so busy this week but I got a little bit in today to make this up.

Any help is appreciated!
"Skateboard 'til the wheels come off"
Element
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location: United States
Posted: 31st Dec 2002 00:34
oopps...I should make that position object stuff a bit smaller. heres the *NEW* smaller code:




Im trying to keep the code as small as possible

"Skateboard 'til the wheels come off"
Element
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location: United States
Posted: 31st Dec 2002 11:11
anybody?

"Skateboard 'til the wheels come off"
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 31st Dec 2002 17:45
i'm not quite sure i understand what you want to achieve...
just randomly reposition the objects each time the key is depressed?

Anata aru kowagaru no watashi!
cloud
21
Years of Service
User Offline
Joined: 27th Oct 2002
Location:
Posted: 31st Dec 2002 18:50
i think he wants to make a computerised object that can do its own thing in its own time.

cloud
Element
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location: United States
Posted: 1st Jan 2003 00:02
Cloud is correct on what im kinda trying to achieve. Basically I just want the boxes(they will be enemies once the testing is done), to move around by themselves doing their own thing. If I can get this done, it will be something like:

on collision2 goto battlescreen
if battlewin then mb=mb-1
if battlelose then mb=mb and goto losescreen

mb would be the number of boxes(1 to 9)...then it would make the number of boxes, 8 on the screen. I still have to figure out all the formula, but I need to get the moving randomly by themselves first. help? lol


After I get that done, I will try to make them follow you if you get a certain distance from them(meaning I need to prob make two types of collision, 1 that is touching the enemy then making you go to the battle screen, and another to make the enemy follow you if you get too close)

"Skateboard 'til the wheels come off"
SG=Shadows Gate
New RPG game coming to you from GP Interactive
cloud
21
Years of Service
User Offline
Joined: 27th Oct 2002
Location:
Posted: 1st Jan 2003 16:45
i might be able to help with some of it to get the enemies to follow u u just put point object enemynumber,x#,0,y# in the main loop and it will hopfully turn and follow u when told to move.

cloud

p.s i have do things simular to what u want before not with the enemies moving but when u collide with it it goes to a battle screen but i don't know if i have the codes any more but i'll see what i can do for u.
Element
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location: United States
Posted: 8th Jan 2003 11:57
Thanks, appreciate the offer. I actually "Re-did" all of my code and everything works GREAT...have them moving on their own...next thing to tackle is collision to everything...and having the monster follow you if you get too close and if it hits you, it goes to the battle screen...might need a little bit of your help on that cloud, but ill see if the team and I can accomplish it first.

"Skateboard 'til the wheels come off"
SG=Shadows Gate
New RPG game coming to you from GP Interactive

Login to post a reply

Server time is: 2024-04-18 05:50:17
Your offset time is: 2024-04-18 05:50:17