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 Professional Discussion / Help With A Code To Place Objects On A Map.

Author
Message
cochran2904
15
Years of Service
User Offline
Joined: 28th Mar 2011
Location: at my computer
Posted: 29th Dec 2011 04:29
Does anyone know of a code or a tutorial for a code I can use for a game where a user can place a selected object on the map by clicking the mouse and be able to drag the mouse and place multiple of that object? i'm trying to make my game kind of like crusader the castle builder game and the function i'm talking about is placing the castle walls. Thanks
-Chris
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 29th Dec 2011 18:48
there's an example of this in dbpro's help, i think it's under pick object command

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Dec 2011 20:24
ahhh the correct thread was it moved?

ZestyPro
14
Years of Service
User Offline
Joined: 27th Aug 2011
Location: The Grid
Posted: 29th Dec 2011 20:46
I've done this before. i made a small cube that is positioned at the position of the player but is moved forward with the move object command. then use an if then command to see if the small cube is colliding with an object you want to pick up. then another if then statement to see if the player is clicking. then position the object the player is picking up at the position of the small cube.

i like cheese pizza. do you like cheese pizza?

Login to post a reply

Server time is: 2026-07-10 15:30:45
Your offset time is: 2026-07-10 15:30:45