ID:174543
 
Igive up on asking for a premade code like a fireball or something but i dont know how to code how iam supposed to get magic if all the demo and Lob and Turtuoils dont really tell you!
Well, first you need to decide exactly what a "fireball" does.

1) You're gonna need a fireball object. It'll need an icon. Just do this:
obj/fireball/icon='fireball.dmi'
And make an icon called "fireball" that has a fireball icon.
2) Either the fireball has a "target" that it flies directly towards, or it just flies blindly in the direction it's thrown (probably the direction the player is facing when it's thrown
3) What does the fireball do when it hits a player? What happens when it hits a wall or a door? What happens when it flies to the end of its range (does it explode violently or just disappear?)

Once you think things like that through, it should be a lot easier to write a snippet of code that handles fireball-throwing!

-LoW
In response to Lord of Water
I dont know how to code at all
In response to Darkfirewolf5
Did you even read Lord Of Water's post? We cant help you until you help yourself!!! Tell us how you want the fireball to behave and then we can help you
In response to Darkfirewolf5
Well, that's where the problem is then. The tutuorials aren't there to tell you how to make a fireball (even if there's a fireball example in one of them!). The tutorials are written with the goal of teaching someone who is new to BYOND coding how to write a program. Once you understand coding concepts, then you can understand our help well enough to draw conclusions, write some code, and get everything working the way you want it to. Zilal wrote a number of good tutorials for beginning coders - search on the hub for them.
In response to FranquiBoy
Ok i want a fireball that does damamge zccording to level exmple lv does 15 lv40 does 250 and you click the tab with the frieball in it and you elect wich monster in sight you wanna attack and boom hits o and dissapear wen it hits a wall and can hurt people
In response to Darkfirewolf5
Sigh* I have to bump my message down just to do this! Listen, don't ever, ever come on the forums and say anything even close to the words "I don't know how to code"
or "Give me the code for..." You'll get nothing! Atleast take the effort to read and practise some of the tutorials, I reccomend Zilal's. Then practise. Also give a good, thorough description of what you want. It's pure stupidity when somebody comes on and asks for code without even trying. If you have tried and tried and practised and practised and still don't understand, consider buying the Blue Book, or looking at the reference. If you completed Zilal's first tutorial and learnt all of it I bet you could get a start on a "Fireball" code. Then try looking up a demo on projectiles and move() procs to help you out. Once done and your stumped on an error come to the forums and seek advice. Elsewise don't waste your and our time!

The Conjuror
In response to Darkfirewolf5
Darkfirewolf5 wrote:
Ok i want a fireball that does damamge zccording to level exmple lv does 15 lv40 does 250 and you click the tab with the frieball in it and you elect wich monster in sight you wanna attack and boom hits o and dissapear wen it hits a wall and can hurt people

Look at your question presented in another way: You're asking many different questions, each of which is a separate problem.

Ok i want a fireball

By which you mean a projectile? Fired under what conditions?
Learning how to make a projectile is one place to start.

that does damamge

How the projectile code is written will be the key factor in deciding how to do this.

zccording to level exmple lv does 15 lv40 does 250

Level of what? The attacker? A spell? Charge on a wand? The defender's level?

and you click the tab with the frieball in it and you elect wich monster in sight you wanna attack

This would be a HUD: heads-up display. I'd save this part of your project for much later, once you've mastered more of the basics.

and boom hits o

This is redundant: The projectile's movement should be the first thing to tackle.

and dissapear wen it hits a wall

How the projectile code is managed will determine this. A simple Bump()-based system ought to work.

and can hurt people

This is redundant too, since you already mentioned damage.

Just as a friendly reminder, punctuation doesn't hurt either: it helps make your message more readable to the people who can help you. If you take the time to break up your question into parts like this, you'll also see better that it's really lots of smaller projects--and that might give you an idea of where to start.

As to not knowing how to code: as others have already mentioned, it's time to learn. What you want to do is perfectly possible, and most of it you can even tackle without much experience. We'll gladly help you through the process of learning the ropes. What we can't do, though, is give you pieces of code that will work when plugged right into your game, because all battle systems are very game-specific.

Lummox JR