Examples of using Actiononparam in English and their translations into Spanish
{-}
-
Colloquial
-
Official
This is done with an ActionOnParam box.
ActionOnParam Blackbox is one of the most versatile of all blackboxes.
We need two ActionOnParam to do this.
As you know,this creates an ActionOnParam.
This will create an ActionOnParam blackbox with an assigned numeric parameter.
We're going to use yet another ActionOnParam box.
Drag an ActionOnParam box from the ParametersManagement category to this script.
So, we will use the setValue action in ActionOnParam.
Once that is done, the" floor" ActionOnParam is activated, which leaves its total" totalSecs" value in the" currentSecs" parameter.
So, we're going to substitute the shots collections in the target parameters of the ForEach and ActionOnParam boxes for asteroids.
As we have seen before, this creates an ActionOnParam automatically, and it just so happens that the default action is clone, meaning we don't need to change it.
Once the text has been obtained,we divide it into characters, grouping it up in a collection of Strings via the" split" ActionOnParam.
If it is less, before activating the" CalculateSecsMillisecs" Script, we activate the ActionOnParam"copy" blackbox which sets the time remaining value to zero.
So, drag the clone variable from the second box's output parameter anddrop it in the logic panel to create an ActionOnParam.
To do that we can use the getChildre action of the ActionOnParam blackbox, using as target the parent element of the collidable bitmaps.
The first thing the" setMilliseconds" Script does when activated is convert the value" currentMillisecs" is to represent to text via the" toString" ActionOnParam blackbox.
But when there are no more data for more levels, the completed output is triggered, which activates an ActionOnParam-type blackbox called showGameOver with the setVisibility action over a bitmap, to show the Game Over image on screen.
Once the" ScoreOnScreen" Script is activated by its" update" input,it begins converting the score value contained in the" scorePoints" parameter into text via the" toString" ActionOnParam blackbox.
If translate action is selected, the ActionOnParam Blackbox requests an input parameter of type Vector2D to enter the offset to translate, and generates a Vector2D output parameter called positionResult with the Sprite new position.
Whenever you drag out a parameter or a resource from the logic panel,the editor will create an ActionOnParam with the element dragged out as the target parameter.
When we drag out a collection, the box that is automatically created is ActionOnCollection, which indicates that we're going to perform actions on a collection,not just on an individual element like ActionOnParam does.
The" start" input connector activates the ActionOnParam"copy" blackbox which assigns the value of 3 to the"currentLifeLevel" parameter and, once that's done, it activates the" setAnimation" ActionOnParam blackbox which displays the"3" animation Sprite.
Now, to assign a value the points variable to the scene's text object,drag score from the AssetManager panel and in the ActionOnParam that's created, select the action setText.
The activation of the get connector starts the calculation of time remaining,starting with the activation of the"-" ActionOnParam blackbox that subtracts the value of the time that has passed since the" elapsedTime" parameter contents started from the total run time value contained in the" roundMillisecs" parameter.
To implement the Script RoundConfigManager, we will build a graph from which we will take from the ParamMap a list with the data from each level in a Collection-type parameter using an ActionOnParam blackbox with the getItem action.
After this, the"-" ActionOnParam is activated, which subtracts" currentSecs" from" totalSecs", which gives us the decimal part of" totalSecs", and stores it in" currentMillisecs" in order to later activate the"*" ActionOnParam blackbox, multiplying by 1000 the" currentMillisecs" parameter which contains the decimal value of the seconds left in order to convert it into milliseconds, which is stored in the" CurrentMillisecs" parameter erasing the previous value.
Once the speeds are assigned you have to verify that the selected operation for the blackboxes is‘*'(which is the default operation for numerics) anddrag the deltaTimed parameter of the KeepActive blackbox and drop in the timesToMultiply parameter of every actionOnParam.
When an element or a parameter is dragged from the Asset Manager or from the Parameters tab or from another Blackbox, whose type is any of the listed before, andreleased on the target input parameter of ActionOnParam, then the action property of the Blackbox shows a list of all possible actions for that data type.
What this means is that there are no seconds, which means the whole value of" CurrentTime" is used as a value in the" CurrentMilliSecs" parameter,which is then copied by the" Copy" ActionOnParam blackbox; but it doesn't copy the seconds, because they're 0, and that gives the value of zero to the" currentSecs" parameter via the" copy" ActionOnParam blackbox.