Frictional Games Forum (read-only)
No matching signatures headache - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html)
+--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html)
+--- Thread: No matching signatures headache (/thread-56497.html)



No matching signatures headache - Tesseract - 09-20-2019

Hi, haven't been on here for about a million years. 

Just messing around with the editor and found that if I add a collide callback under void on start along with the actual callback function it just returns an error telling me that there are no matching signatures to Entity_AddCollideCallback. As far as I can tell I don't need to include any scripts to use these functions https://wiki.frictionalgames.com/hpl3/game/scripting/function_reference/hps_api#entity_addcollidecallback

If I do the collide callback thing in the editor itself, actually defining the callback function in the level editor it works, but not with the actual "Entity_AddCollideCallback" function in the script.

I'm very well acquainted with Amnesia's collide callbacks and doing it the same way (with SOMA's collide callback function) just doesn't work. Any reason why? I mean, I'm literally following the same ideas demonstrated here: https://wiki.frictionalgames.com/hpl3/community/other/monsters 

Cheers.


RE: No matching signatures headache - Mudbill - 09-20-2019

Can you show the code you have?


RE: No matching signatures headache - Tesseract - 09-21-2019

(09-20-2019, 05:38 PM)Mudbill Wrote: Can you show the code you have?

I've since deleted it and moved on, but I get the same issue anyway with this: 
Code:
#include "interfaces/Map_Interface.hps"
#include "base/Inputhandler_Types.hps"

#include "helpers/helper_map.hps"
#include "helpers/helper_props.hps"
#include "helpers/helper_effects.hps"
#include "helpers/helper_audio.hps"
#include "helpers/helper_imgui.hps"
#include "helpers/helper_sequences.hps"
#include "helpers/helper_game.hps"
#include "helpers/helper_modules.hps"
#include "helpers/helper_ai.hps"

class cScrMap : iScrMap
{
    void Setup()
    {
    }
    
    //-------------------------------------------------------

    ////////////////////////////
    // Run first time starting map
    void OnStart()
    {
        Entity_AddCollideCallback("Player", "TriggerArea_1", "volumes");
    }

    bool volumes (const tString &in asParent, const tString &in asChild, int alState) {
        if (alState == 1) {
            cLux_AddDebugMessage("in volume");
        }
        else if (alState == -1) {
            cLux_AddDebugMessage("out of volume");
        }

        return false;
    }

}

Now the collide callback works but the debug message will return the same "no matching signatures" issue (despite me doing the same thing I've done here under another mod to test). Also if I don't use a debug message and do something else with the callback it will only fire once despite me telling it not to delete the callback once it has been called.


RE: No matching signatures headache - TiManGames - 09-21-2019

You forgot to add
PHP Code:
#include "helpers/helper_areas.hps" 



RE: No matching signatures headache - Tesseract - 09-21-2019

(09-21-2019, 02:01 PM)TiManGames Wrote: You forgot to add
PHP Code:
#include "helpers/helper_areas.hps" 

Thanks! I will give that a go next time I'm in.


RE: No matching signatures headache - Tesseract - 10-06-2019

(09-21-2019, 02:01 PM)TiManGames Wrote: You forgot to add
PHP Code:
#include "helpers/helper_areas.hps" 

Got back to it to test it out and can confirm this still doesn't work.