3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Want to make action/strategy action role playing games. Help  (Read 686 times)

« on: November 21, 2013, 07:33:56 AM »
First. Problem I faced after making a block is I dont know how to click the block to receive quest.
« Reply #1 on: November 21, 2013, 03:10:31 PM »
If you used a skinmesh, there is a little checkbox in the properties window that says 'Detect Mouseover Event'.  You can use this in a script to check if you have clicked the box, and if you have you can open a quest dialog box or whatever you want the game to do from there.
« Reply #2 on: November 23, 2013, 12:31:37 PM »
I have tried once. But could not do it. Can you tell me joe
« Reply #3 on: November 24, 2013, 04:23:54 PM »
If your skinmesh object is OBJ_0, then the mouseover flag is IN_3 (you can see what it is in the INPUT box of the script dialog.

so the script would be:

if (IN_3 > 0)  // check if the mouse is over the skinmesh
{
     // if it is, do stuff
}

you could also say:

if (IN_3 > 0 && iMouseButtonClick(0))  // checks if the mouse is over the skinmesh AND if you left-clickedd
{
     // if both are true, do stuff
}
« Reply #4 on: November 30, 2013, 02:20:38 AM »
I added terrain car skinmesh g force script. In script
void Main()
{
if(IN_69 > 0)
iObjectHide(OBJ_0);
}
Car did not vanish
« Reply #5 on: November 30, 2013, 08:57:41 AM »
Quote
First. Problem I faced after making a block is I dont know how to click the block to receive quest.

a block to receive a quest???

exactly what are you asking here... what exactly is this QUEST you are referring to...

--Mike
« Reply #6 on: December 01, 2013, 10:02:19 AM »
I know this is not easy. Butt in a simple priject after I did what I wrote in the previous post the skinmesh did not vanish when I put the cursor over the skinmesh. How to get mouse over flag worked?
« Reply #7 on: December 02, 2013, 10:06:46 AM »
Quote
the skinmesh did not vanish when I put the cursor over the skinmesh. How to get mouse over flag worked?

ok... that's a lot better... at least i know what you're trying to do now...

the mouse over flag for is skinmesh must be enabled in the properties dialog box, and then a lil simple logic will let you do whatever you want... in your case, hiding the mesh...

the logic looks like this:  if mouse over then hide mesh...

the script code looks like this: 
Code: [Select]
   if(IN_3>0)iObjectHide(OBJ_0); 
(if the skinmesh is OBJ_0)...

you realize though, that this will only occur once, because once you hide the mesh the mouseover can no longer "see" it...


if you need to toggle back and forth between visible and hidden, then i'd suggest you link a sprite to the screen location of the mesh... set the sprite opacity to 0.01 (something just above invisible, the mouse over can still see it but the viewer can't), and use that as the mouse over target instead...

then use the same logic as above... this time the mouseover over the sprite will determine the visibility of the mesh...

look at i3DLocationToScreen() in the script reference for how to keep the sprite positioned...

Code: [Select]

Vector3      v1,v2;

void Main()
{
   iObjectShow(OBJ_0);
   iObjectLocation(OBJ_0,v2);
   i3DLocationToScreen(v1,v2,OBJ_44);
   iObjectLocationSet(OBJ_22,v1);

   if(IN_23>0)iObjectHide(OBJ_0);

}



--Mike
« Reply #8 on: December 03, 2013, 10:53:57 PM »
Just thought I'd point out that you can make a toggle system within the script like so:

if (IN_3 > 0) { iObjectHide(OBJ_0); }
else { iObjectShow(OBJ_0); }
« Reply #9 on: December 04, 2013, 07:56:37 AM »
Quote
Posted by: Sorvius
Insert Quote
Just thought I'd point out that you can make a toggle system within the script like so:

if (IN_3 > 0) { iObjectHide(OBJ_0); }
else { iObjectShow(OBJ_0); }

question...
did ya try that lil bit o code above before you decided to make your point (whatever that point might be)...

anyways, here's a point you might wanna consider...  no, never mind... lets see if you can figure it out yourself  why your code DOESN'T WORK...

1 - put a mesh in a scene, add a script,  link the mesh, paste that code in there,  and run it...
2 - what are the results that you get...

do you see the value of basing your code on sound logic... and what happens when you don't THINK FIRST...

here's a few points ya might consider...
 
bad logic = bad code...
no logic = insanity...



--Mike


« Last Edit: December 04, 2013, 09:48:16 AM by Mike Hense »
« Reply #10 on: December 07, 2013, 09:52:48 AM »
Making rpg strategy adventure rpg can really be successfully and big like runescape, sherwood etc.
Pages: [1]