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 / mouse code

Author
Message
alexander1973
10
Years of Service
User Offline
Joined: 10th May 2014
Location:
Posted: 17th Sep 2014 14:29
I have maybe a stupid question, but you have every time you use the mouse to re-create the program.
Or can I pre-load a program into the game, and when I use the mouse function
I need to call with a small line
because you have the mouse for all actions necessary
such as:
dragging pictures
select commands
menu and make your choice
etc..
game design is one room game
many actieviteiten in the room

'm Still doing research or what I want to make is also possible within this software

thanks

alexander
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Sep 2014 13:35
Quote: "I have maybe a stupid question, but you have every time you use the mouse to re-create the program."


I don't understand the question. What do you mean?



Powered by Free Banners
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 18th Sep 2014 15:01
Hi there

I can vaguely guess what you mean . We use the mouse in all kind of programs , but the code change for different cases.


We can use it for selecting option in a menu, but we need to write some code .

We can drag images...that is easy, but the code would be different to the selecting one .

We can use in 3D and here it changes completly.

What is exactly what you are trying to do ?

Cheers.

I'm not a grumpy grandpa
alexander1973
10
Years of Service
User Offline
Joined: 10th May 2014
Location:
Posted: 19th Sep 2014 06:18
Here's the small simple script.

The overall purpose of my idea
garage chef
active =
1 = Garage
2 = Warehouse
3 = showroom
1.1
garage
The customer enters the garage, the player can take the contract or refuse.
For each assignment is a time limit in which the contracts need to be resolved.
If the job is not completed on time then you get paid nothing and you will get a negative assessment of the client.
Assessment of customer can reduce the number of future jobs and raise the higher your reputation, the more customers and better paid jobs are offered.
The time for a task depends on the type of contract is a simple command takes the mechanic little time to meet the job every job you can see what it takes to fulfill the contract:
1.2 On repair Description:
1.3 Number of parts that are required.
1.4 The time which the fitter requires
1.5 The number of reputation points you can earn
1.6 what the customer wants to pay for the repair
1.7 The time you get the customer to perform the repair.
1.2
repair description
There are different types of repair:
[1 = Small turn] [2 = Large turn] [3 = Brake] [4 = Exhaust] [5 starter =] [= 6 Dynamo]
[7 = timing belt] [8 = Ignition] [9 shocks =] [= steering 10] [11 = oil change]
[12 = fuel] [13 tires =] [align = 14]

1.3
number of Elements
By type of repair various parts are needed, they will be purchased by the player depending on which factory they buy and the amount of the components, they are of average value. A repair example seven parts each part costs 25 Euros so the repair costs seven parts and takes the player 7 x 25 = 175.
Warehouse has limited space this space the player can increase by expand.
There are three suppliers each vendor has its own prices change every day,
Each vendor has its own delivery times.
One supplier is just closer than the other
1.4
Time the technician needs
A mechanic needs for a particular job, a time when the mechanic is doing a repair, he can have no other job.
The player determines which command the mechanic, the player can see on the screen or the mechanic is available and how much time he is working it with the adoption of new orders.
The mechanic works at his own pace the repair off a lower level technician doing slowly about a distant gevorde mechanic but gevorde mechanic costs more per day, you can also have your technicians train them to work faster and cheaper with parts handling.
  Nivo mechanics:
Level 1 = low skilled costs 25 euro per day work rate 3
Level 2 = medium educated costs EUR 60 per day work rate 7
Level 3 = higher educated cost per day 90 euros pace 12
Level 4 = prof training costs 120 euros per day pace 20

1.5
reputation points
For each assignment you earn or lose reputation points when yes have a mission off within the time that the customer had given the reputation points you get there with you can not make it in time, the customer will not be happy and will give you reputation points going to cost, so it is also good to plan everything well and not to take any job even if you lose all your reputation points an order refusing to take them.
You get one rep to take command
You get 2 rep for carrying out the assignment on time
You lose one rep for refusing orders
You lose 2 rep for executing command that was not on time

1.6
What the customer paid
Every customer wants the best for the least money  So a client offers you a contract to it, you can see what you've lost parts up and how long a technician is working on a simple math for the player components procurement = x edition technician salary per day = + edition edition = cost to the player - what the customer paid = profit or loss
If you buy cheaper your components you have more profit, work your mechanic you can take on more jobs thus faster more profit at the end of the week.

1.7
Time for repair.
The client indicates in what time he comes to pick up the car again, there are differences possibilities
[1 = over 4 hours] [2 = about 6 hours] [3 = about 8 hours] [4 = 12 hours] [5 = 24 hours] [6 = 48 hours]
[7 = 72 hours] [8 = 96 hours] [9 = 120 hours] [10 = 144 hours] [11 ​​= 168 hours]
[12 = 192 hours]

sorry for the bad engels.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Sep 2014 23:36
Your script doesn't tell us anything about what you're trying to accomplish.

To me, it sounds like you want to create a library of common mouse functions that you can quickly import into new programs.

Not sure if this is what you're after, but maybe it's a start. This is a library I wrote to simplify many common mouse functions.
http://forum.thegamecreators.com/?m=forum_view&t=201158&b=6

Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 20th Sep 2014 14:36 Edited at: 20th Sep 2014 14:58
Heh, triple clicked eh, Phaelax? What was the last thing that you triple clicked?

EDIT: lol, just had a further read of that thread, I remember that! These days, I tend to pull data out of Windows DLL files, makes it easy to get mouse desktop cords.



So many cool things can be done via the Windows DLL's!

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Oct 2014 18:33
Double click highlights a word, triple click often used to highlight an entire sentence or line...... pron only takes 1 click

luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 9th Oct 2014 14:23
Quote: "I have maybe a stupid question,"


I might also have stupid questions, but anyway...

How many projects have you finished before you pick this one?

How many experience you have with coding in general?

How many times you quit or wanted to quit coding?

Do you have intentions of making AAA MMO in next few years as a one man team?

Do you have problem only with the mouse code or the rest of your "script" is also filmy?

I ask you because sometimes even if something looks simple on paper or very well planned it could eaquals to moving mountains when you code it while you don't possess the skills and know how.

I think i understand the question of your first post.

If you ask if we write every function for every program again from scratch, well...sometimes we do, sometimes we recycle what we allready have written for other projects.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!

Login to post a reply

Server time is: 2024-11-27 05:27:58
Your offset time is: 2024-11-27 05:27:58