English Pokeball

6 replies
Goto Page
To the start Previous 1 Next To the start
16.03.14 08:03:43 pm
Up
MarteszHU
User
Offline Off
I got a pokeball model. How to make it catching units by throwing it at it, and release it when i throw it again?
"True trolls never fail"
16.03.14 08:12:56 pm
Up
Nova
User
Offline Off
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.
Hexenverbrennung, Inquisition, Kreuzzüge... Wir wissen, wie man feiert! - Ihre Kirche
17.03.14 11:43:29 pm
Up
Stranded_Guy2910
User
Offline Off
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.
18.03.14 12:06:29 am
Up
Hurri04
Super User
Offline Off
@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.
18.03.14 04:23:50 pm
Up
MarteszHU
User
Offline Off
Thanks for the help, i started making the script.
"True trolls never fail"
18.03.14 09:32:21 pm
Up
Stranded_Guy2910
User
Offline Off
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.
18.03.14 10:35:45 pm
Up
Hurri04
Super User
Offline Off
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