Forum
Stranded II Scripts PokeballPokeball
6 replies 1
Releasing the unit is a bit harder. You could make it with on:impact and impact_ground. There's just a problem: Storing more than one unit and distinguish the "filled pokeballs". You could just make a rule: "only one unit at a time, and every pokeball stores the same unit". Would be easier than the other approaches.
Nova has written
Make a new object with the pokeball model. Use the code from the spear, as example. Damage should be 0. Now you can work with hit_weapon to activate a special script when you hit a unit with the weapon pokeball. Store the informations about the monster inside a few variables.
Releasing the unit is a bit harder. You could make it with on:impact and impact_ground. There's just a problem: Storing more than one unit and distinguish the "filled pokeballs". You could just make a rule: "only one unit at a time, and every pokeball stores the same unit". Would be easier than the other approaches.
Releasing the unit is a bit harder. You could make it with on:impact and impact_ground. There's just a problem: Storing more than one unit and distinguish the "filled pokeballs". You could just make a rule: "only one unit at a time, and every pokeball stores the same unit". Would be easier than the other approaches.
Or you could create various types of pokeballs for each unit, would make it easier to create both, the script to store the unit and to release it.
trying to bypass this by creating more types will not work because in order to store all the information you'd have to create a ridiculous amount of types. there are the parameters for "pokemon" type, hp, xp, ap, attacks and maybe some more and you'd have to create a type for each state meaning that you'd have to multiply types * hp * xp * ap * attacks * ... to get the number of types you'd need, possibly resulting in millions of types.
it's just not possible to write definition files that long let alone S2 supporting to load them all.
I'd suggest to wait until some first releases of S3 will come out because then variables for items will be available.
Hurri04 has written
@ Stranded_Guy2910: the Stranded 2 scripting system is not really suited for what MarteszHU needs because it doesnt allow to store variables in items when the player has more than one of that type.
trying to bypass this by creating more types will not work because in order to store all the information you'd have to create a ridiculous amount of types. there are the parameters for "pokemon" type, hp, xp, ap, attacks and maybe some more and you'd have to create a type for each state meaning that you'd have to multiply types * hp * xp * ap * attacks * ... to get the number of types you'd need, possibly resulting in millions of types.
it's just not possible to write definition files that long let alone S2 supporting to load them all.
I'd suggest to wait until some first releases of S3 will come out because then variables for items will be available.
trying to bypass this by creating more types will not work because in order to store all the information you'd have to create a ridiculous amount of types. there are the parameters for "pokemon" type, hp, xp, ap, attacks and maybe some more and you'd have to create a type for each state meaning that you'd have to multiply types * hp * xp * ap * attacks * ... to get the number of types you'd need, possibly resulting in millions of types.
it's just not possible to write definition files that long let alone S2 supporting to load them all.
I'd suggest to wait until some first releases of S3 will come out because then variables for items will be available.
I was thinking all he wanted was to capture a unit and then release it, without all the fancy xp, health, etc. system.
In that case, you could make that only one unit can be in your inventory, like if you already have a pokeball with a lion in it, you can't have another lion, but you can still have a monkey. This way, you would be able to use variables for the items, and it wouldn't be much of a big loss.
the problem I see however is that it will cripple the player's gameplay choices if he isnt even able to have more than one monster of each type especially since S2 doesnt have all that many different animals.
on the other hand you might argue that everyone would only create a team of raptors because they're so OP compared to everything else but then again there isnt even an official multiplayer where you could compete with other people.
so still, variables for items are needed to make the really cool stuff happen and animals would have to be reballanced if you want to battle.
that's why I recommend waiting for S3 which might even have different animals than S2.
1