lucid's Forum Posts

  • so does this mean it's not possible? or it's an annoying question? or what?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You guys are awesome, seriously.

  • thanks guys

    im making a custom controls object to work with mouse and keyboard as a simple workaround until the official custom controls come out. i can retrieve the value of the key pressed from mouse-keyboard, and reuse it for my own custom movement event sheets. but id like to share it with the community and most people use behaviors for movement, if i had a way to access the control data, and trigger those events, it could work with built in behaviors as well

  • is there a way to simulate a control press? i dont mean like a keyboard key or a mouse click, i mean like up, down, or jump, etc. so my plugin could trigger events as if the actual controls were pressed?

  • nevermind

    got it...

    The SDK is just as awesome as the rest of construct.

  • not sure if this was known, but the image manipulator copy paste to from sprite canvas stuff doesn't seem to be working

  • depending on how much you need to do this

    pasting distorted sprites onto canvases and updating collision masks would work

  • thanks devs

    this rocks

  • I see lucid is doing what we discussed as a possibility to his idea l

    yes, thanks sol

    Using the two functions I mentioned above allows you to get/set variables from other objects.

    thanks rich. I have few questions, though, if anyone has a few moments

    from rts(just because the code's already there, I don't plan to use rts:

      795 // User defined functions
      796 long ExtObject::GetData(int id, void* param)
      797 {
      798 	switch (id) {
      799 	// If your extension uses a window, you can return it here
      800 	case 1337:
      801 		return (long)(pfLayoutMaps[pLayout].pfMap[params.cellsize]);
      802 	case 1338:
      803 		return (long)&waypoints;
      804 	case 1339:
      805 		return pfcellW;
      806 	case 1340:
      807 		return pfcellH;
      808 	}
      809 
      810 	return 0;
      811 }
      812 [/code:2luvbwu9]
    
    ok, so to use this, first I would get a pointer to the object the same way I did before:
    
    [code:2luvbwu9]CRunObject* Object = params[0].GetObjectParamFirstInstance(pRuntime);[/code:2luvbwu9]
    
    then could I just:
    
     [code:2luvbwu9]Object->GetData(1337)[/code:2luvbwu9]   ?
    is that correct?  What is the second void parameter for? 
    
    also, in:
    [quote:2luvbwu9]  813 long ExtObject::CallFunction(int id, void* param)
      814 {
      815 	switch (id) {
      816 
      817 		// Write speed to param
      818 	case CF_GETSPEED:
      819 		*(float*)param = speed;
      820 		break;
      821 	}
      822 
      823 	return 0;
    
    is CF_GETSPEED just an int const?
    and if so, for the sake of form, and keeping all the plugin code uniform, is there a specific file I should define these constants in?
    
    also, I got GetObjectParam from the ACE Table Wiki, and I got GetObjectParamFirstInstance from the RTS behavior, is there a list somewhere of all the possibilities that can be used?, and does GetObjectParamFirstInstance return the first picked instance? or just the first instance period?
    
    as an aside, I'm so damn excited  , so far this plugin thing is awesome.  it's exactly what I needed for my project
    thanks again for the suggestion Sol!
  • Don't think he's talking about private variables?

    right, not private variables, just ordinary c++ variable declared in the plugin's source. even if i have to do some extra steps to make it useable, itd be really useful

  • I've gotten it to work so I can change the angle of a sprite from within an action

    is it possible to get variables you create for an object from an object taken as a parameter

    for instance:

    MyPlugin has a variable I'd like to be accessible like Angle is on sprites, call it MyValue

    MyPlugin2 has an action where you can choose a MyPlugin Object as a parameter

    and it will retrieve and change MyValue

    is that possible?,

    and how?

    because object->info seems to be only for retrieving values declared in the RunObjectHeaderInfo struct

  • thanks ashley

  • I want to know how to change things about an object taken as a parameter

    a simple example would be if I made Angle Changer object

    AngleChanger has an action

    Change Angle

    it gives a drop down list, where you can choose a sprite

    and when that action triggers at runtime it changes the angle of the sprite

    obviously useless, and more of a behavior

    but, for learning sake

    what would the C++ line of code be that changed the parameter object to a new angle

    and could I use the same method to change a variable in an object I made with the sdk?

    thanks

  • I tried using 0

    it still won't work

  • it's pretty simple

    http://dl.getdropbox.com/u/1013446/arraytodothis.cap

    +start of layout
    --------Array-Set index 1 to "hello"
    
    +Array-Value at 1 = "hello"
    --------Set Text to "hello"[/code:jpftuy47]
    
    why is it not triggering the event?,  I really have no idea
    
    if you check the debugger, you can see there is indeed an array with the value "hello" at the first x index