This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk

Forum rules

Suggestion: Bullet Values Read from Owner Upon Being Fired

Here you can find all solved gameplay problems and bugs (beginning from Pre-Alpha 1.8.8).
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Locked
User avatar
Bash Kraken
Superfighter
Superfighter
Posts: 75
Joined: Tue Mar 22, 2016 12:49 pm
Title: Action Hero Extraordinaire
SFD Alias: Bash Kraken
Started SFD: December 2012
Location: Post-Apocalyptic East Coast - U.S.
Gender:

Suggestion: Bullet Values Read from Owner Upon Being Fired

Post by Bash Kraken » Sun Mar 26, 2017 9:27 pm

I understand that PlayerModifiers are not necessarily meant to be applied "live," but the freedom live changing of PlayerModifiers gives scripters is very important when dealing with projectiles. For example:
Say I want to make a map with a CPU character who has ProjectileDamageDealtModifier of 2 while using most small damage guns like the pistol. This makes this particular CPU a harder opponent, simply because his projectile damage is higher. However, say I also want the CPU to use the sniper rifle, but I don't want him to possibly do 90 damage. Switching his ProjectileDamageDealtModifier back to default is simple enough, but doing so now creates the highly likely possibility of his pistol bullets that are still on their collision course do default damage instead of double. Of course I could always wait a set amount of time before changing his ProjectileDamageDealtModifier, but this causes other issues. If I want a double damage pistol shot to be quickly followed by a normal sniper shot, I cannot do this completely reliably. If I want to change his ProjectileDamageDealtModifier for multiple weapons, it presents the same problem on a larger scale with even more small highly possible inconsistencies.

All of this can be solved by simply reading all of the values necessary for each bullet at the time each bullet is fired. This does not affect any existing plans for PlayerModifiers, even though they are not meant to be applied live. It is truly just a way to give more freedom to scripters while also keeping the original intention for PlayerModifiers solid. It is even possible that reading values upon a bullet being fired or reading values on impact could be an option done through scripting, allowing for even more options for both the Devs and scripters.
2 x
heck
Hidden Content
This board requires you to be registered and logged-in to view hidden content.

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1887
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 36

Post by Gurt » Tue Mar 28, 2017 8:57 pm

We're changing this to suggested behavior to the next version.
0 x
Gurt

User avatar
Bash Kraken
Superfighter
Superfighter
Posts: 75
Joined: Tue Mar 22, 2016 12:49 pm
Title: Action Hero Extraordinaire
SFD Alias: Bash Kraken
Started SFD: December 2012
Location: Post-Apocalyptic East Coast - U.S.
Gender:

Post by Bash Kraken » Thu Mar 30, 2017 4:42 am

Alright, great! Thanks for reading my post.

There is one thing that I'm not sure I made clear. The overall problem with inconsistencies in bullet values is with them changing after they have been fired. If all of an owner's existing bullet values are changed when a new bullet is fired, then the problem still exists. This means that, in order to be completely consistent, each bullet must somehow keep the original values that they were given when fired. I that assume this can be done by storing each bullet's original values until coming in contact with a player.
0 x
heck
Hidden Content
This board requires you to be registered and logged-in to view hidden content.

Locked