Lots of questions condensed in a single post

0plus1

  • Posts: 20
I'm playing with your wonderful engine, I'm sorry if this has been asked before but I can't find anything searching.

1) When doing an action like pushing, is it possible to push toward another actor?
2) When doing an action that involves setting the x y position is it possible to set it to an instruction set like this: windowwidth/2+cos(variable*90)*windowwidth/2
3) Analysing my 2nd question, how do I get the scene size? How do I get a reference to mathematical functions (cos, abs..)?
4) How do I set a global variable? If they are not part of stencyl how do you set for example the score of a scene?


Thank you very much

h1rnz1lla

  • *
  • Posts: 649
ok i try to go through them

1) push has a function to push an actor in a certain angle, therefor u should calculate in which angle you have to push actor1 to hit actor2 right?
2) i dont know what you mean by instruction set, but you can set this type of calculation into a number attribute
3) there is a design block under Scene -> World, which holds the scene width in pixel or tiles
math functions are under: numbers&text -> Trig/Exponents, the green block where u only see "sin" holds some other functions like tan/cos etc.
4) global variables are called Game Attributes you find them in the Dashboard under "Attributes"
there you can set up a Game Attribute that is usable in the whole game. in design mode they are under  Attributes ->  Game Attributes