Forum

> > Stranded II > Scripts > Pokeball
Forums overviewStranded II overview Scripts overviewLog in to reply

English Pokeball

6 replies
To the start Previous 1 Next To the start

old Pokeball

MarteszHU
User Off Offline

Quote
I got a pokeball model. How to make it catching units by throwing it at it, and release it when i throw it again?

old Re: Pokeball

Nova
User Off Offline

Quote
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 s2 cmd 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 s2 cmd on:impact and s2 cmd 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.

old Re: Pokeball

Stranded_Guy2910
User Off Offline

Quote
user 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 s2 cmd 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 s2 cmd on:impact and s2 cmd 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.

old Re: Pokeball

Hurri04
Super User Off Offline

Quote
@user Stranded_Guy2910: the Stranded 2 scripting system is not really suited for what user 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.

old Re: Pokeball

Stranded_Guy2910
User Off Offline

Quote
user Hurri04 has written
@user Stranded_Guy2910: the Stranded 2 scripting system is not really suited for what user 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.


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.

old Re: Pokeball

Hurri04
Super User Off Offline

Quote
yes, that might work indeed.

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.
More >


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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview