Why wont the Update function call my fuction? (Topic name changed 2Save spce)

playtheHnote

  • Posts: 395
Hey guys I have been away for a bit. But, I have learned to code.... in C#. I was wanting to know if I could potentially use these skills to build sound king 2. I feel that I could create much better stuff this way. Thanks for your time!

If not, then maybe someone can tell me why this doesn't create a custom block in Stencyl's interface...

And holy cow... code tags work here???!!!, Cool!

Code: [Select]
public function _customBlock_DebugBlock (__Sound:Sound):Void{
trace("Debug");

}

« Last Edit: July 15, 2015, 02:04:46 pm by playtheHnote »
Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

rob1221

  • *
  • Posts: 9472
Blocks create code, but code can't be used to create blocks.  Also, Stencyl does not use C# at all, including native extensions.

playtheHnote

  • Posts: 395
okay then ill have to learn how to haxe and call to public functions using custom blocks | (OR) Just use the interface...
(I'm Just always running outta "Stencyl Memory".) Which can be annoying...

thanks, Rob!
Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

playtheHnote

  • Posts: 395
Okay so I am  making an effort here because the codes I will need to write differ from stenyl's capabilities . Anyway why would this updater not call my debug method here in Haxe?
Code: [Select]
public function new(dummy:Int, dummy2:Engine)
{
super();

addWhenUpdatedListener(null, onUpdate);
addWhenDrawingListener(null, onDraw);
}

public function onUpdate(elapsedTime:Float, list:Array<Dynamic>)
{
if(wrapper.enabled)
{
DebugMethod();

update(elapsedTime);
}
}

public function onDraw(g:G, x:Float, y:Float, list:Array<Dynamic>)
{
if(wrapper.enabled)
{
draw(g);
}
}
public function DebugMethod(){
trace("Debug");

Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

rob1221

  • *
  • Posts: 9472
I don't know.  I never use code behaviors, only code blocks and extensions.