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 / Request for a simple code snippet , please

Author
Message
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 16th Jan 2006 05:59
I need a simple code for this :

I putted a matrix , and i chose TOP perspective , and now i created a cone , and i want to make a mouse movement for cone , i mean when i move mouse left , cone goes left , when right , then cone goes right .

Here`s my code :


But it`s so ahhhm...not working , i tryed few more options , an none worked , how can i make this (can someone please make a simple code ?)



Thanks for reading this out !


Milkman
19
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 16th Jan 2006 06:15
Quote: "
Cz#=Wrapvalue(Cz# - Mousemovex()/2)
position object 1, CX#,CY#,CZ#
"


your cz# variable is named differently, that could be a problem. make it CZ#, not Cz#

"Genius is 1% inspiration and 99% perspiration"
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 16th Jan 2006 06:18 Edited at: 16th Jan 2006 06:20
EDIT: "changed!"

Try this:





--------------
Uncle Sam
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 16th Jan 2006 06:23
nope , it just goes away , and never returns when i move the mouse...


Milkman
19
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 16th Jan 2006 06:25
then its moving too fast...
try this:


"Genius is 1% inspiration and 99% perspiration"
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 16th Jan 2006 06:39
To be honest , i think the whole conception of the code is wrong , becouse when i move mouse up , it goes up and right + it hopes like a dog in the same time...


Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 16th Jan 2006 06:53
I think someone should write a new code , becouse i`m very confuzed with this , i have no idea why it doesn`t work...


Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 16th Jan 2006 07:51
I think the problem is that you're using one of those serbian mice with the square balls.

smallg
Valued Member
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 16th Jan 2006 11:30 Edited at: 16th Jan 2006 11:33
here you go dodic, this what you want to happen?


i know i used a different way of doing it buut it works just aswell, i think.

*edit*
just noticed "top down"

so changed the y to z,

life's one big game
toggy
19
Years of Service
User Offline
Joined: 6th Jun 2005
Location: Serbia
Posted: 16th Jan 2006 12:53
Try like this.
Good work smallg.
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 16th Jan 2006 19:10
Thanks , that code really works !


(now i`m happy...)

next step i`m now working on , but i might have some trobles so i`l ask for help right away :

I want to make when you click mouse left button , it TEXTURES THE GRID OF MATRIX THAT THE CONE IS ON .


Login to post a reply

Server time is: 2025-05-22 23:42:12
Your offset time is: 2025-05-22 23:42:12