pass parameters to a mapped function?

1 favourites
  • 5 posts
From the Asset Store
Two types of minimap: "full map" and "player is the center" (square map and radial map)
  • I don't quite understand where to pass the parameter for my mapped function?

    I would have expected it in the call mapped function action, but I don't understand this concept of the index in there...

  • Did you see the Function Maps template? It explains how to pass parameters.

    https://editor.construct.net/#open=function-maps

  • Thanks, dop2000! I understand how to do it now.

    From a beginner's perspective it's a bit confusing having to call the intermediate function just to be able to pass parameters.

    It would be nice if the call mapped function would simply allow for parameters to be specified.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yeah, I think function maps are hard to deal with, I've never used them in a real project yet.

  • Yeah, I can see why ^^

    Maybe there's better ways to do what I did there.

    As tedious as they are to set up - the nice thing about them is that I can use the string names from my menu items to call them.

    My menu is generated based on an instance variable holding all the items names. So if I want to add a menu item I just add ",apples" to that variable and on runtime the menu creates one more item.

    Of course I also have to add the new string to my function map and create the actual function for it, but that's it.

    Is there an easier or maybe more flexible approach?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)