ID:1412267
 
I have two questions.
1.how do you place objects or images in windows?
ex. if i created an rpg or rts if i wanted to show a predetermined image of the class in the window how would i?.

2. can i create a verb that allows me to use other verbs but be changed base on the class or object the player is using?
ex. skill1(verb)
the player chooses to be a classA and classA has splash(verb) as skill1. If he picked classB instead skill1 would be blast(verb).
oh by the way i was reading about datums so would i create a datum for skill1 or create the verbs as datums or something else entirely?

sorry for the paragraph.

bump
Before I start writing, I want you to read what I have to say.

















I will be posting references to some stuff you should read. You're not obligated to read "all" of it but I would like you to read what parameters it takes in.

For example, fcopy(file,path). fcopy() takes file and a path to copy it to. The reference for it is http://www.byond.com/docs/ref/info.html#/proc/fcopy.

This is what I will be giving you as I explain how to do this stuff. I want you to try out how to do it yourself and if you're having trouble, feel free to ask some more questions.













If anything I write here is wrong, feel free to post corrections as I'm writing this without compiling or testing them. Just off the top of my head. Forgive me. Just saw that he wasn't being helped with something so simple. Lol.

1. How do you plays objects or images in windows?

Well, there's screen_loc

You can use it like so:
obj
LoginImage
icon = 'loginImage.jpg'
screen_loc = "1,1" //Places it at the bottom left corner

mob/Login()
var/obj/LoginImage/LI = new
client.screen+=LI


2. Can I create a proc that allows me to change which verbs they have access to?

If this is what you're asking, then yes. You can make it so that they only have access to a specific set of verbs. In a sense, this can be used with Admin verbs as well. But, I won't give it to you. Instead, I'll give you the code that Admin verbs are used for, if you don't already have it. Try to edit it. Shouldn't be too hard.
mob/proc/GiveAdmin() //Hint: Perhaps.. choose class?
if(src.key in admins)
src.verbs = typesof(/mob/admin/verb)

mob/admin/verb //This is different from mob/verb see below
Reboot()
world.Reboot()

Boot(mob/M in world)
del(M)


In the code above, here's what happens. If you call src.GiveAdmin() upon login, then the user will be running that proc. It'll check if their key is in the admins list. if it is, it gives them all verbs under mob/admin. Why? Well, by default a player is a mob. You can change them to mob/Player if you wanted. by doing

world
mob = /mob/Player


which is also here for more examples. So, the user isn't of the type mob/admin so they don't by default get the verbs from there.

If you want an analogy.. You're Jabs, I'm Xirre. We're not related. If you want my stuff, you'll have to kill me for it. In this case, run GiveAdmin to kill me. Okay.. that explained nothing. But, I hope you get it lol.

I WENT FAST WHILE TYPING THIS. SO, IF YOU NEED ANY MORE EXAMPLES, EXPLANATIONS, OR FOR ME TO CLEAR UP ANYTHING. DO. NOT. HESITATE. TO. ASK.
I would actually say Inheritance is key here.

In the below example DoSomething() would be a verb defined on all players, including children. You can also define verbs on just those nodes in the tree such as lover and fighter below.

mob/player
verb/DoSomething()
world << "I am doing something!"

mob/player/Fighter
DoSomething()
world << "I am doing something special here!"
verb/make_war()
world << "I'll kill you."

mob/player/Lover
verb/make_love()
world << "I love you, man!"


We can overwrite verbs or create new on some children, but not on others. fighter would overwrite the verb and add a new one. It does something special rather than just doing something and they can make war, whereas lover would just perform the regular action, and then also make love.

Now if we create these as classes, we can overwrite the function of their skills pretty easily by using this inheritance. Rather than using world/mob to give them their mob, you can change their mob to something that interacts with an initial mob. You can then decide what they want to be and move them to that mob.

world/mob = /mob/notplaying_yet

mob/notplaying_yet/Login()
var/selected_class = input("What class do you want to be?") in list("Fighter","Lover")
var/class = text2path("/mob/player/[selected_class]")
if(class) //if it is not null (the path exists) create a mob.
var/mob/player/newbie = new class() //create the path
newbie.name = "Bob" //give him a name.
src << "I shall call you Bob."
client.mob = newbie //move into the new mob
del(src) //remove the temp login mob
else
src << "Oops, nobody created that class yet."


The verbs would show correctly due to the proper inheritance.
Why do I see no "voting" in this post? o.O... What's going on.
I must have broke it with my numerous edits. ;)
I'd report this as a bug.. but.. That'd require me to test it so it's more simplified for the devs. q_q.. I don't feel like it.
In response to Xirre
If questions go unanswered for a few days, the voting stuff ends up going away, which is the case with this thread I believe.
I totally didn't know that.. Wow. Well, now I do. Thanks.
i know i asked this but this maybe to advance for me at the moment. Ill wait till im done re-reading the byond guide.