Find Jobs
Hire Freelancers

Dark Basic (DBPRO) - Functions - Scroll object - Place object

$10-15 USD

Closed
Posted over 14 years ago

$10-15 USD

Paid on delivery
Basic function development task for a ark Basic pioneer or someone looking for experience. ## Deliverables A task ideal for a Dark Basic pioneer or someone looking for experience. I need 3 high level functions for a basic object placement system with any globals stored as UDTs( classes ). You will need a terrain object to load as a map, I've attached one. Ideally this will take you less than one hour, but you can take 3 days, I'm in no hurry for this. scrollObjectSelection( nextObject, current, cursorObject, csvStringList, loopList ) placeObjectOnMap( objectId, cursorObject, mapObjectId, onFloor ) placeCursorObjectAtMousePosition( objectId, onFloor, snapX, snapY, snapZ ) Here are the details of what I want; you may justify a design change if your solution prooves better. remstart FUNCTION scrollObjectSelection( nextObject as boolean, current integer/ string*,? cursorObject, csvStringList as string, loopList as boolean ) > tokenize the string with commas // I want to use a string loaded from file at certain points in the program > Find the location in the list with the current object > Swap the cursor object with the next object, or previous object Dependant on the nextObject parameter > > IF loopList is on AND we are past the end/begining THEN select the first item/last item dependant on what direction we are moving; where nextObject 0 = previous > > Return the current object > > ENDFUNCTION FUNCTION placeObjectOnMap( objectId, cursorObject, mapObjectId, onFloor as boolean, floorOffset, limbMode as boolean) > show the object of objectId > IF the cursorObject is outside of the map object's bounding box THEN exit the function and return 0 > position the object of objectId at the cursorObject, with the same orientation > > IF onFloor is true > > > place the object on the mapObject so it collides with it; maybe using intersect object; then offset its Y position by floorOffset; exit the function and return 0 > > > > IF no collision is found underneath THEN hide object of objectID, exit and return 0 > > ENDIF > > IF limbMode is true THEN add the object as child limb to the mapObject at the correct position with the same texture > return 1 > > ENDFUNCTION > > FUNCTION placeCursorObjectAtMousePosition( objectId, mapObject, distance, onFloor AS BOOLEAN, snapX#, snapY#, snapZ# ) > > IF onFloor > > > IF the mouse is not over the mapObject THEN exit and return 0 > > > > position the cursorObject at the point of intersection; at the mouse cursor's visible position on the map > > > > for each snap# value, snap the object in position; the nearest position divisible by the snap# real values; if they are not 0; favour the ceiling/higher value > > > > ELSE > > > Position the object at the distance specified where the mouse position isoccured > > Perform the snap position procedure > > > > > > ENDIF > > Exit and return the objectId > > ENDFUNCTION remend I need the functions and variables with the first word lowercase, other words titlecase. I've used uppercase here for clarity; there is no nead for indenting the first level of code; again I've done it hear for clarity. No need to add any fancy features if you don't have the time, I'm interested in what the functions say they do. Installed plugins: STYX, PHYSICS, DATA, UNITY, AI, EXTENDS, ENHANCEMENTS, LIGHTS and ENHANCED ANIMATIONS. ///////////////////////////////////////////////// 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables): a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Dark Basic Pro
Project ID: 2933777

About the project

Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of UNITED KINGDOM
London, United Kingdom
5.0
1
Member since Oct 23, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.