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 / Matrix Hotspots Help!

Author
Message
Zius
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location: Sweden
Posted: 3rd Aug 2003 16:11
Ok..I'm been trying to understand how I can but special commands in hotspots. I've tried that Matrix editor and I find it quit usefull. But I don't understand how I can use the inbuilt hotspot function in it. Does anybody now any tutorial-site for making your own hotspot?.
Lecks
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: - Please Select -
Posted: 3rd Aug 2003 16:23
how do you mean hotspot?
i might be able to help if you tell me how/why you want to use it.

Zius
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location: Sweden
Posted: 3rd Aug 2003 17:39
Umm... Places like doors or triggers. Or something like in racing games. In RPg games for special trigger-events etc.
Carlitos
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 3rd Aug 2003 17:41
Are you talking about MAtEdit?

--carlitos
Zius
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location: Sweden
Posted: 3rd Aug 2003 17:52
That's the name of it! Can you explain how the hotspot feature works?
Or how I can make my own by just using DB?
Lecks
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: - Please Select -
Posted: 3rd Aug 2003 18:03
the easiest way would probrably be to create collision boxes, although i'm not sure how to use these, as i make my own collision.
i guess the method would depend on how many you would be using. if it's not too many, you could write your own functions. i'll try to write a sample:

sorry that ended up being a bit more complicated than it was going to be hehe. it would be one way of doing it though. you can even set it so it ignores an axis . could be slow, i'm not sure i havent tested it.
good luck
lecks

Lecks
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: - Please Select -
Posted: 3rd Aug 2003 18:04
sorry i dont know anything about matedit

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Aug 2003 21:36
I do!

MatEdit has 10 hotspots - which can be placed on your matrix in MatEdit at design time using the keys F1 to F10.

When you load a matrix into DB, you have the variable FKey(H,coord) where 'H' is the number of the Hotspot and 'coord' is the X or Z co-ordinate of the hotspot.

So for hotspot number 1, the X position on the matrix would be at FKey(1,0) and the Z position would be at FKey(1,1).

Hotspot 2's matrix position would be at FKey(2,0), FKey(2,1) and so on.

For example, if you wanted to place a cube (object 11) at hotspot position 3 you would use the code:

Position Object 11,FKey(3,0),FKey(3,1)

... and that's it.

TDK
Lecks
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: - Please Select -
Posted: 3rd Aug 2003 21:56
well thats gotta be a hell of alot easier than the crap i wrote

Zius
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location: Sweden
Posted: 4th Aug 2003 13:13
When you say FKey you mean like this.

Code: Position Object 11,1(3,0),1(3,1)
...or am I wrong?
But then I have to put a function to it so it does somthing right?
Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 4th Aug 2003 13:42
FKey() is a MatEdit function that returns the coordinates of the hotspot. The 2nd parameter of this function describes one of the coordinates: "0" will lookup the X coord, "1" will lookup the Y.

Zius
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location: Sweden
Posted: 4th Aug 2003 13:48
Oh! Doh! And so on..... I didn't see it until now. The FKey() is a function! I now there's a tutorial-site at MatEd's homesite but I forgot the webadress to it.
M00NSHiNE
21
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 4th Aug 2003 18:45
I think my matrix zone code is similar to this - each tile is indexed so there can be an array that uses the tile index numbers as array index numbers, i think the entire part from "do.... down to the ztileco...." line was originally done by kevin picone, i modified it to test this idea.

Hope this helps and feel free to mess.

Login to post a reply

Server time is: 2025-05-19 19:34:20
Your offset time is: 2025-05-19 19:34:20