Shi Musume
New Member
I do not care what you think. All I want is rules to be followed, to help people, and have fun.
Posts: 42
|
Post by Shi Musume on Feb 2, 2015 20:39:35 GMT
In response to a thread created by MissBowl, I have created this thread to help even none programs make your own mystery script and know what does what!
First things first: I will go into this assuming you have at least tried to read Kamuna's guides. I will expect you to understand a little of it, but end up lost on a few advanced things and how to use the functions list. So, go read it. However, I may reexplain something Kamuna may have mentioned to help you memorize it. After all, refresher courses on the basics help!
Another Rule about asking questions in this thread: Read the previous questions/ answers first! I may have answered your question if another person asked it first. I do not like repeating myself if it is not needed.
Last Rule regarding questions: I, Shi Musume, do not claim to have the ability to code everything/ anything. I have my limits. However, if you ask a question I can not answer I will work at finding an answer to whatever you wish to do. If you read this thread and see a question I have not answered that you can help on, feel free to give an answer/ response.
|
|
|
Post by missrinrin on Feb 2, 2015 20:55:19 GMT
An Idea I have for my mode is that my role is immune a.k.a unaffected to all weapons and items except a special custom weapon I plan to make. My idea is basically, a Ghost that is repelled by charms (Damaged) and is only affected by said weapon. Is such a thing possible? You've been a big help thus far, so if it isn't, it's not the end of the world. Thanks again. :3
|
|
|
Post by Egil on Feb 2, 2015 21:17:32 GMT
Yeah, how does one make a specific role immune to things like tasers and feathers?
|
|
Shi Musume
New Member
I do not care what you think. All I want is rules to be followed, to help people, and have fun.
Posts: 42
|
Post by Shi Musume on Feb 2, 2015 22:18:40 GMT
I will address missrinrin first.
Her question was basically:
How do I make a role unable to be damage by weapons ;and how do I make that role only able to be able to be damaged from a certain weapon?
noattacking(killer,1); -This is LITERALLY all you need to make a person unattackable. It's one of the basic functions listed under Kamuna's commands. It stops you from being attacked, yet you can attack. The 1 can be toggled off with a 0 command if you wish. The issue is feathers/ syringes can be used against people with this on. It's not a hundred percent workable.
noattack(killer,1); - This verb does the opposite of the noattacking command. It stops that role from being able to attack which can be toggled on and off. Usually I put no attacking and no attack on the same role to help balance.
BUT, your option of allowing that role to be damaged another way can help balance it out.
I do not know a way to bypass the no attack thing with any custom weapon. The only other way I suggest is making only a certain role able to see/ thus attack them.
This can be done with these codes , although I still regret I can not fully answer your desire: invisibility(killer,1); see_invisible(customrole1,1);
With this the killer is invisible and only the one you want able to fight them can see/ attack the being. I will add more later on if I know how to fix it. ___________________________________________________________________________________________________
Now to Egil's question.
How can I make a role immune to tasers/ feathers/ things like that?
Tasers/ feathers, there is no way to make a role fully immune to these and not immune to other objects.
The taser's coding treats it like a weapon that does 1000 stam damage or so. The only way to stop this is to stop a person from being attacked, which does not fit your goal.
The feather if my theory is right is treated as a on use = force throw causing that dragon to be tossed. That dragon is a misc classed object which right now has no immunity commands to evade.
My advice is to seek out a delete taser/ black feather code from your mode, which I will put the info on how to do this as soon as I have the exact coding you need.
Note: I will see if I can make what you both happen. However, I hope my current answers will work for now.
|
|
|
Post by Kamuna on Feb 3, 2015 4:37:50 GMT
This will be easier with the onAttack and onAttacked functions coming up, but if you want a victim to be immune to tasers, you can just check if the attacker has a taser equipped beforeClick, if so, set the person's stamina value really high, then, afterClick, set their stamina back to the original value. If that doesn't work then I must have tasers to auto-knockout no matter what. Either or, I will add immunity to tasers and black feathers. As for currently, you can gain immunity to feathers by deleting any feather dragon that comes within range of hitting the victim.
As for sedatives, food, and first aid kits, and eventually fire and cooking certain items, those have respective functions for disabling them as well already.
Bypassing the noattack requires beforeClick and afterClick again, similar to taser immunity. Again, onAttack and onAttacked will make this easier. Actually, onAttack and onAttacked may be split into beforeAttack/beforeAttacked and afterAttack/afterAttacked as well, giving even more flexibility to the programmer.
Also, why not have a code repository? Just put a bunch of functions that you've made up into a repository, and then people can copy that code for later use.
Mystery GUI is also a thing that will come eventually...
|
|
Shi Musume
New Member
I do not care what you think. All I want is rules to be followed, to help people, and have fun.
Posts: 42
|
Post by Shi Musume on Feb 3, 2015 18:03:01 GMT
This prove a difference between us Kamuna.
The average person will read what you said and be like:
Okay... I need something like: OnAttackedcheck if weapon = taser; if taser = noattacking (customrole1,1) afterClick noattacking(customrole1,0)
That code would not do a thing even if the basics are there.
Kamuna, if you could actually type out a bit of the code and explain what each part does as I did to help those who have no training in codes.
However, I will do my best to work out a working code based on the info you gave for them Kamuna... though I have never touched those functions in my previous modes/experience yet.
As for the code repository, I like that idea! I will see if I can get some time together to list function I made that works, and add to it based on questions in this thread for whatever people may wish to do.
|
|
Veemon
Junior Member
Posts: 56
Byond key: VictoryVeemon
|
Post by Veemon on Feb 4, 2015 23:04:23 GMT
It's also helpful to note you can do a bunch with functions when attached to specific objects. Say you make a custom book or knife or billhook or something, and you want it to activate a code when the first person picks it up. Onpickup works wonders.
Anyway, I'll try this.
Is there a function that would allow me to make a custom verb to detect directional values? For example: *Role 1 clicks Find verb* printto(role1,"The blue haired boy is northeast of here.") Obviously it wouldn't look like this as I'd use a string and a strcat to return the direction etc.
But the question is, function for returning north/south/east/west of player's current position?
|
|
|
Post by missrinrin on Feb 5, 2015 20:04:31 GMT
Another question of mine is the ability for custom weapons to do Grief damage instead on HP damage?, I know this was touched upon quite a while ago, but I thought I'd bring it up again because I feel this is something that is essential to my mode. Basically, weapons just cause Grief instead of damage. Thanks again. :3
|
|
Shi Musume
New Member
I do not care what you think. All I want is rules to be followed, to help people, and have fun.
Posts: 42
|
Post by Shi Musume on Feb 5, 2015 20:22:12 GMT
Ah! Rinrin, it's nice to see you again!
I am responding here to let it be known I read the latest questions.
Missrinrin, as Kamuna said onattack does wonders and would help the other person's code, but I see that it may work yours too. Now that I have something more to work with I will make the function/ code you need so you may do ANYTHING you wish to happen when you attack. Expect your response within a few days if no one beats me to the punch.
Vee, I am not sure where to begin with this, so for now I am hoping to get an answer from Aqua or Kamuna. Worst case: I will do my own research and let you know what I find out. I assume the system will involve a current position check of that role and the role of the other one and identify it as something like:
if y axis is greater then killer's add north, if x axis is greater then killers add east to the str.
|
|
|
Post by Kamuna on Feb 6, 2015 3:15:43 GMT
Veemonget_dir_to(Ref,Trg) where Ref is the object you wish to have as a starting point and Trg is the target object. Please note that this returns the direction in integer form. If you know binary, you can figure out what directions are what when you know what BYOND's NORTH, SOUTH, EAST, and WEST direction numbers. Look those up. This function is better than Cookie's and BYOND's default methods, as it uses angles rather than position to get the direction. BYOND handles it similar to Cookie's, just in integer form, while Misuterii's handles it with the proper math.
|
|
Shi Musume
New Member
I do not care what you think. All I want is rules to be followed, to help people, and have fun.
Posts: 42
|
Post by Shi Musume on Feb 13, 2015 19:28:28 GMT
Bumping this thread so it will not be lost in the mix.
I know I am the current thread's owner, but I come addressing a question to mystery scripters:
How can we make a popup with a tally/ vote option with custom pictures on each where the vote can be changed until a certain time?
This question being answered can help speed up the process of Umiropa's building.
I am also doing my best to work out the code for what I desire.
|
|
Shi Musume
New Member
I do not care what you think. All I want is rules to be followed, to help people, and have fun.
Posts: 42
|
Post by Shi Musume on Feb 14, 2015 18:56:12 GMT
notase(who,num=1) nofeather(who,num=1)
These commands are added to the function's list Egil! Now you have easier access to what you want.
|
|
|
Post by Kamuna on Feb 15, 2015 1:09:59 GMT
There are GUI commands in Mystery Script. Some of them overlap with BYOND: Check out BYOND's reference for those (such as winget, winset, winshow). Also check out the default skin for Misuterii High, as it has some custom windows in it.
|
|
Shi Musume
New Member
I do not care what you think. All I want is rules to be followed, to help people, and have fun.
Posts: 42
|
Post by Shi Musume on Mar 19, 2015 20:29:48 GMT
Until further notice, I, Shi Musume, shall no longer check on this thread/ give advice when help is asked.
If anyone else wishes to step up and help posters here, do it, I will not get in your way.
|
|
|
Post by talentnove on Apr 30, 2015 23:29:40 GMT
Hi, new here. Is there a way to access default roles, and if so, how?
|
|