Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Explosion, Armor, and Splash Damage Help
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
Please help me make scripts of armor that have effects that stack and I want to know how to make splash damage and damaging explosions
- Uartar
- Scratcher
22 posts
Explosion, Armor, and Splash Damage Help
About making scripts of armor with stackable effects, did you mean something like this?
when I receive [calculate armor effects v]And would damaging explosions be something like:
set [health bonus v] to [0]
set [dodge chance v] to [0]
if <[wearing v] contains [leather helmet] ?> then
change [health bonus v] by (10)
change [dodge chance v] by (5)
end
if <[wearing v] contains [leather boots] ?> then
change [health bonus v] by (5)
change [dodge chance v] by (5)
end
when green flag clickedYou could simulate splash damage with that kind of explosion, but invisible.
forever
if <touching [explosion v] ?> then
change [health v] by ((0) - ([damage v] of [explosion v]))
end
end
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
I want to make a Zombie Shootout game with zombies that sometimes wears and drops armor and we can wear their armor
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
Including healing items, food items and collectible items and an inventory and crafting system
- The-Kid-Programmer
- Scratcher
16 posts
Explosion, Armor, and Splash Damage Help
Including healing items, food items and collectible items and an inventory and crafting system
For healing items, use this.:
wait until <touching [healing stuff v] ?>or
change [Storage v] by (1)
change [health v] by (10)Then for food, prepare some hunger variables
if <touching [yummy food] ?> thenFor inventory, use this.:
change [food stuff v] by (1)
end
wait until <touching [item v]>
change [Storage v] by (-1)
using UnityEngine;
public class GameCrasher : MonoBehaviour
{
public float jumpForce = 10.0f;
private void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
GetComponent<Rigidbody>().AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
GetComponent<Rigidbody>().AddForce(Vector3.left * jumpForce, ForceMode.Impulse);
}
}
}
I am a C# Unity programmer. You can ask me any questions on how to make a script that does a certain thing, or just some programming jokes.
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
Can you pls help me the script on making a battle game with ai shooters, scrolling background, cover, inventory, weapon crafting, food system, respawn system and health
- -TUB-
- Scratcher
100+ posts
Explosion, Armor, and Splash Damage Help
AI shooters
Make a list for bullet x, y, direction, and speed. Then, use a custom block with run without screen refresh to move and draw the bullets. Add an item to every list to create a bullet.
Scrolling Background:
Make two variables named scroll x and scroll y, then make variables (for this sprite only) for every sprite named x and y. Position the sprite by using
Inventory
Use a list, with another list for amounts if needed.
Crafting
Make a list of recipes using codes, then encode the current crafting grid. Give the player an item if it matches a code.
Food
Have a variable named hunger, which decreases constantly. Eating food increases hunger.
Respawn
Set x and y to the spawn point when you die
Health
Similar to food, but decrease health when an enemy hits the player.
Make a list for bullet x, y, direction, and speed. Then, use a custom block with run without screen refresh to move and draw the bullets. Add an item to every list to create a bullet.
Scrolling Background:
Make two variables named scroll x and scroll y, then make variables (for this sprite only) for every sprite named x and y. Position the sprite by using
go to x: ((x) - (Scroll x)) y: ((y) - (Scroll y))
Inventory
Use a list, with another list for amounts if needed.
Crafting
Make a list of recipes using codes, then encode the current crafting grid. Give the player an item if it matches a code.
Food
Have a variable named hunger, which decreases constantly. Eating food increases hunger.
Respawn
Set x and y to the spawn point when you die
Health
Similar to food, but decrease health when an enemy hits the player.
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
I mean inventory that stores items that we can use for later use, I also want the game to have base building to protect ourselves
- griefercube
- Scratcher
500+ posts
Explosion, Armor, and Splash Damage Help
I sense that you want to make an advanced game, so try to make your game top-down. That would be easier to start
sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
Last edited by griefercube (32th Undecimber, XXXX)
https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)
list of working bbcodes:
[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
How can I make a top down shooter with an inventory and collectible items
- griefercube
- Scratcher
500+ posts
Explosion, Armor, and Splash Damage Help
Scrolling. I’m going to make an example at my account
sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
Last edited by griefercube (32th Undecimber, XXXX)
https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)
list of working bbcodes:
[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]
- griefercube
- Scratcher
500+ posts
Explosion, Armor, and Splash Damage Help
sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
Last edited by griefercube (32th Undecimber, XXXX)
https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)
list of working bbcodes:
[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
Then, how do I make zombies sometimes spawn with weapons and armor that sometimes drops weapons, armor, food and lootboxes?
- griefercube
- Scratcher
500+ posts
Explosion, Armor, and Splash Damage Help
Use some loot generation code and put it on the zombie.
sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
Last edited by griefercube (32th Undecimber, XXXX)
https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)
list of working bbcodes:
[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]
- griefercube
- Scratcher
500+ posts
Explosion, Armor, and Splash Damage Help
It’s in the same project, I added the zombie.
sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
Last edited by griefercube (32th Undecimber, XXXX)
https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)
list of working bbcodes:
[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]
- griefercube
- Scratcher
500+ posts
Explosion, Armor, and Splash Damage Help
You add in the stuff that generates in the lootTable, add the rarity in the LootRarity, and you’re done. Use the two custom blocks at the start of the clone to generate zombie. (And btw, the holding script could be edited in a way that you could add stuff in an armour table and it’s rarity (how often it’s dropped and how often a zombie wears it)
sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
Last edited by griefercube (32th Undecimber, XXXX)
https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)
list of working bbcodes:
[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]
- Earthbright
- Scratcher
97 posts
Explosion, Armor, and Splash Damage Help
Can you please give an example in your game?
- griefercube
- Scratcher
500+ posts
Explosion, Armor, and Splash Damage Help
I also suggest you to share the project (or give the turbowarp.org link) for me to help you on your project.
sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
|other projects■how I made the banner■animated thumbnails?■i’m on wiki!■Cubey Mines|
Last edited by griefercube (32th Undecimber, XXXX)
https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)
list of working bbcodes:
[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]
- Discussion Forums
- » Help with Scripts
- » Explosion, Armor, and Splash Damage Help