so im making a gun type thing because im bored and i ran into some trouble.
- how would you make it so that when the bullet type thing hit someone it hurt them. (i know you can’t use if (playertouchsme) {})
- my timeout for it to destroy wont work.
- i can’t figure out how to get the if (player.dir=0) { } and for the bullet to go on a specific side of a player depending on which was the player is facing.
also, im just going to make the weapon something like
if (weaponfired) {
putnpc bullet.txt,x,y;
}
Heres what i have so far for the bullet(its all worked by chat to test out):
if (created) {
x=30;
y=30;
canbecarried;
canbepushed;
canbepulled;
}
if (playerchats && strequals(#c,/Sreset)) {
x=30;
y=30;
}
if (playerchats && strequals(#c,/right)) {
move 60,,3,;
}
if (playerchats && strequals(#c,/left)) {
move -60,,3,;
}
if (playerchats && strequals(#c,/down)) {
move ,60,3,;
}
if (playerchats && strequals(#c,/up)) {
move ,-60,3,;
}
if (playerchats && strequals(#c,/DL)) {
move -60,60,3,;
}
if (playerchats && strequals(#c,/UL)) {
move -60,-60,3,;
}
if (playerchats && strequals(#c,/DR)) {
move 60,60,3,;
}
if (playerchats && strequals(#c,/UR)) {
move 60,-60,3,;
}
if (playerchats && strequals(#c,/sdestroy)) {
destroy;
}