Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nexus

Pages: 1 2 3 4 [5] 6 7 8 9 10 ... 238
61
Client sided or server sided?

62
Modification Help / Re: GuiBitmapButtonCtrl::onMouseEnter
« on: September 05, 2015, 01:48:27 PM »
Alright guys listen up, there are a lot of weird things you are going to encounter with guiMouseEventCtrl and I only discovered all of this by using them extensively for the last couple of years.

Bug 1: guiControl::setName() does not automatically associate a guiMouseEventCtrl with the various ::onMoulove() functions that you would expect to be called.  This means that if you create a guiMouseEventCtrl in the gui editor, and then name it "mymousecontrol" or whatever, it will not call mymousecontrol::onMoulove() for that mouse control.  You can fix this by doing a cut-paste of the mouse control in place.  That way it is created already with a name, and will work correctly.

Bug 2: guiMouseEventCtrl::onMouseMove() and the drag functions are only called on one axis at a time.  This means that if you move your mouse on a diagonal, you will get two calls for ::onMouseMove() in a row.  One of them will be for the change in x, one for the change in y.  This means that if you try to make a paint program or something, the user will see something that looks like steps when they try to draw a diagonal line.

There are also a lot of subtle ways the mouse controls handle entering and leaving that may or may not be considered bugs but are extremely complex.

You should also probably stick to using mouse event controls and making sure you are just writing the function for some specific class and not all bitmap buttons.

63
I think the compression on the one you set as your avatar is much worse than phflack's.  Look at the various black lines, in particular around the eyes.  The lines look clearer in phflack's image.

64
Modification Help / Re: Transparency messed up with model
« on: September 01, 2015, 03:38:18 PM »
What exactly is it supposed to look like?  Ever since the shader update transparency does not really work correctly, are you sure it is a problem with your model and not the engine?

65
Modification Help / Re: Setting up TorquEdit with Eclipse
« on: September 01, 2015, 12:42:30 AM »
I'm sorry, but I'll hijack this thread for a second and a half to ask what is TorqueEdit?

Eclipse is a java integrated development environment that supports plugins for other languages.  TorquEdit is a plugin for Eclipse for torquescript.  http://web.archive.org/web/20090601072227/http://opensource.kruxgames.com/torquedit/

66
Modification Help / Setting up TorquEdit with Eclipse
« on: August 31, 2015, 06:03:03 PM »
Does anyone have any idea how I might go about setting up TorquEdit with Eclipse?  I found the following links on https://www.garagegames.com/community/forums/viewthread/16491

1. https://dl.dropboxusercontent.com/u/25535993/torquedit/TorquEDIT.7z
2. https://dl.dropboxusercontent.com/u/25535993/torquedit/TorquEDIT_0.4.0.jar
3. https://dl.dropboxusercontent.com/u/25535993/torquedit/TSParser.7z

The source also appears to be available at https://github.com/mixxit/TorquEDIT

However I have no experience using Eclipse and really have no idea what I am doing with these files.

These files don't seem to follow the format that is outlined in this solution: http://stackoverflow.com/questions/5482554/how-to-install-plugin-for-eclipse-from-zip

I found an archived website for TorquEdit that indicates that I should just be able to drop the jar file in the plugins folder and that's it: http://web.archive.org/web/20090601072227/http://opensource.kruxgames.com/torquedit/

However, that does not seem to work.

This stackoverflow page indicates that in new versions of eclipse I should create a plugins folder inside the dropins folder and put the jar there, but that doesn't seem to work either: http://stackoverflow.com/questions/926594/installing-a-plain-plugin-jar-in-eclipse-3-5

I can start eclipse fine, but when I look under Help -> Installation Details -> Plug-ins there doesn't seem to be anything related to TorquEdit.

I have tried downloading Eclipse 3.0.1 (the version mentioned on the archived page), but that appears to be available in 32 bit only and I cannot get it to run on my machine.

I have my eclipse configuration file attached if that helps.

67
Add-Ons / Re: Escape Overlay Released [NARG]
« on: August 31, 2015, 01:59:27 PM »
http://forum.blockland.us/index.php?topic=284897.0

Were you using my file manager mod or are you just hoping that I can help you out?

68
Modification Help / Re: Playertype code that affects buoyancy?
« on: August 30, 2015, 07:59:31 PM »
You could look to see how the old rowboat is coded.  That is actually a bot that is shaped as a boat.

69
Add-Ons / Re: [Client] Menu button sounds are back.
« on: August 28, 2015, 01:56:34 AM »
Well, currently I'm using GuiBitmapButtonCtrl::onMouseEnter because when I use GuiMouseEventCtrl on the buttons for the main menu, the buttons cannot be clicked on.

I know using names is a lot better, but if you had a lot of names but had to use something like this, it's a lot of writing (laziness).

Also, I just did what you said with the current support code, but adding a parent at the end, it doesn't even call the onMouseEnter for the start button, but for the rest of the buttons, they work. (Doesn't make any sense)

if(!isFunction(MM_StartButton, onMouseEnter))
   eval("function MM_StartButton::onMouseEnter(%a, %b, %c, %d){}");


(packaged)
function GuiBitmapButtonCtrl::onMouseEnter(%this, %modifier, %mousePoint, %mouseClickCount)
   {
      if(!%this.isAwake())
         return;

      if(isFunction("mEventHandler_" @ %this.eventType @ "_onMouseEnter"))
         call("mEventHandler_" @ %this.eventType @ "_onMouseEnter", %this, %modifier, %mousePoint, %mouseClickCount);

      Parent::onMouseEnter(%this, %modifier, %mousePoint, %mouseClickCount);
   }


The MM_StartButton class was used as an example, the point of that piece of code is to make it so you don't get an error when you call the parent.  The class used in the eval statement should match the class in the function containing the parent.

70
Add-Ons / Re: [Client] Menu button sounds are back.
« on: August 28, 2015, 01:39:29 AM »
If I remember, I don't think GuiControl::onMouseEnter would affect what GuiMouseEventCtrl::onMouseEnter does, but the other way around will be affected, I think GuiControl should be okay. Probably should be packaged, but doesn't need a parent because the game doesn't come with GuiControl::onMouseEnter in the first place.

GuiControl is the superclass, not packaging and parenting with that will cause more problems than using guiMouseEventCtrl directly.  Here are two basic principles you should use:
1. Use the most specific class possible.  This means don't use GuiControl when you can use GuiMouseEventCtrl, and don't use GuiMouseEventCtrl when you can just use your object's name directly.  Ideally you should use NameOfYourObject::onMouseEtc() instead of a more generic class.
2. If the most specific class isn't exactly your object's name, or if the object is not created by your mod, you need to package and parent the callback.

71
Add-Ons / Re: [Client] Menu button sounds are back.
« on: August 28, 2015, 01:27:42 AM »
Hmm, what about other functions that would use this?

Okay, I found another possible solution, this shouldn't interfere with any mods unless they use the exact function.
Would this work? Would it need to be packaged?
function GuiControl::onMouseEnter(%this, %modifier, %mousePoint, %mouseClickCount)

Yes, that should absolutely be packaged.  If the name that comes before the :: is something that isn't local to your mod, you should package and parent it.

72
Add-Ons / Re: [Client] Menu button sounds are back.
« on: August 28, 2015, 01:17:12 AM »
Okay so the idea is that you always want to have a package for any callback that is not yours.  You don't need to bother returning the parent in a callback because callbacks shouldn't return anything.  If the callback was not created by default, then yes this parent will give a console error.  You can fix this by adding the following to your code:

Code: [Select]
if(!isfunction("MM_StartButton", "onMouseEnter"))
{
    eval("function MM_StartButton::onMouseEnter(%a,%b,%c,%d){}");
}

This will check to see if the function has already been declared, and will declare it as a "do nothing" function if it does not.  I believe that this should probably come before the package, now that I think about it, since the function in the package may cause isfunction to return true.  This will avoid console errors and allow you to properly package these callbacks.

73
Add-Ons / Re: Escape Overlay Released [NARG]
« on: August 28, 2015, 01:10:17 AM »
Oh sorry about that nexus, I should have sent you the files, Its the same release, nothing has changed, I'll remove the link.

Feel free to link the images themselves, and I have nothing against people making edits to my mods.  I just think that repackaging the whole mod to just replace some icons, which I have a system to do normally, is somewhat excessive.

74
Add-Ons / Re: [Client] Menu button sounds are back.
« on: August 28, 2015, 01:04:29 AM »
Uh, when I parented them, some of the functions said "unable to call blah blah"

See my edit, those functions may not exist but you should not assume no one else might try to package them too.  Just because a callback has not been implemented by default does not mean you should not use a parent.  At the very least you should simply declare the function normally instead of packaging it so you don't mess up other mods who properly package it.

75
Add-Ons / Re: [Client] Menu button sounds are back.
« on: August 28, 2015, 12:54:10 AM »
Dude, you didn't parent any of your callbacks.  This will almost certainly break every other mod in the game that tries to use those functions.

Here is the proper way to do what you want:

Code: [Select]
package MM_Sounds
{
    function MM_StartButton::onMouseEnter(%this, %modifier, %mousePoint, %mouseClickCount)
    {
        parent::onMouseEnter(%this, %modifier, %mousePoint, %mouseClickCount);

        //do your thing
    }
};
activatePackage(MM_Sounds);


//this is so we don't get a console error when we call parent and the function hasn't been declared yet

if(!isfunction("MM_StartButton", "onMouseEnter"))
{
    eval("function MM_StartButton::onMouseEnter(%a,%b,%c,%d){}");
}

Pages: 1 2 3 4 [5] 6 7 8 9 10 ... 238