Jump to content

Azazil00

Registered User
  • Content Count

    23
  • Joined

  • Last visited

Everything posted by Azazil00

  1. Every now and then, when I'm editing my scripts, the zoom function just stops working and sometimes will randomly return, but a lot of the time it won't. It's rather frustrating as some of my scripts are pretty large. I'm posting it to try and see if it could be any problem on my end. Thanks!
  2. I've noticed that when making scripts, there isn't an easy way to reference the player all the time. Like for example, right now I am trying to make a staff that throws an entity. The entity should have a rotation that is determined by which way the player is facing. This is hard to do without referencing the player position because I have to write the script in the entity template for the object so that it will rotate when I execute the throw command. Anyway, is there any way that I'm overlooking on how to get player position and rotation from any script? Edit: I did figure what I was wanting to do eventually, and let me tell you, it was so much more simple than my brain was telling me. All I had to do was rotate the object before I set it to the Entity Template. Then it will be thrown in that rotation... yay me..
  3. Azazil00

    Referencing the Player in scripts.

    UPDATE! This is probably the answer to many people's scripts and questions! So I've recently learned how I think you can reference the player in any script, even those without events that reference the player. All you have to do is make a "Global Storage" game logic, edit its script, then create a variable called "Player" inside it. After that, go into a "Player Spawn Point" script, grab the "On Player Created" event, and set the variable "Player" to the Player that the spawn point creates. The global storage gives you global variables, which means they can be used in any script from what I can tell. This means you can reference that "Player" variable after in any script and it will actually be referencing your player! I hope this helps, I know it definitely helps me!
  4. Azazil00

    Referencing the Player in scripts.

    So to create a better reply to this topic and clear some things up to maybe educate a few folks, I want to clarify how I actually reference players in my scripts. But firstly, I want to clarify what I initially made this post about so as to not cause any confusion. I made this post because I was trying to throw the "Iron Spike" entity in a specific orientation that made it look like the spike is flying toward the direction being thrown. I thought I had to manually reference the player and set the rotation and all that after the entity was thrown, but it turns out you can just set the rotation of the entity before you reference it in your entity template. This will set its default orientation. Now anyway, back to the topic of the discussion. How do I reference the player in scripts? Well ultimately, I think you have to start with an event that has either the "Player" or "Trigger Entity" already referenced. So I'm still not sure if there is a way to reference the player in a script that has no default connection to the player. What I like to do is make magic staves and other weapons that give their wielder abilities depending on what attack they use. To begin, I always start my scripts in the staff that I am referencing. This way you gain access to the "On Melee Attack" event, which has three references: Trigger Entity, Attack Type, and Combo Sequence. I never use Combo Sequence because, quite frankly, I don't know how, but I always use the first two. Trigger Entity is just the Entity that Triggered the attack, AKA the player who attacked with the staff. Attack Type is exactly that. There are three attack types, Light, Heavy, and Jump attacks. So after I grab the "On Melee Attack" event, I will then make three "IF" statements to tell what attack I am doing. Here, you can get a reference of the Attack Type and ask if it is = to either a light, heavy, or jump attack to do a task. After I set up my "IF" statements, I then fill them with instructions I've made. (Or I do now at least. My old methods of making staves did not involve Instructions and were much more messy.) Instructions are just a block of code that you can call later and anything inside is executed. It's pretty much a time savor and organization tool, and a very useful one at that. The Instructions have a name of your choosing, and you can also add in references of your choosing too, but these do not automatically reference anything you like. For example, if you create a reference named "Player" it does not automatically reference the player. When calling the Instruction later, you have to assign a value to this reference, meaning you already have to have reference to the player to assign the player to the Reference "Player". All a Reference is is a reference to a Variable of some kind, whether that be your player character, some other Entity, or Item, Game Logic, Number, whatever it may be. Here, you can see my instructions have a single reference beside their names. This reference is called "Player" but it actually has no value, but I assign the "Trigger Entity" to it later. Inside the Instructions are just simply a few particle effects, sound effects, a raycast command, and a variable to hold the direction of the raycast. Anytime you want to reference the player in this script, just drag the "Player" reference to the spot you want. Don't worry about the names of the instructions, you can call them whatever you like, I called mine here "Gust" and "Wind Blast" because I am making a "Wind" based magic staff. Also, usually, I will use a throw command instead of a raycast, but they are set up and function almost entirely the same way. When you call your instructions in the "IF" statements, you just drag the "Trigger Entity" into the open spot next to "Player" and viola! <--- This is what your "On Melee Attack" event should look like at the end.
  5. So I was trying to make script with a Crude mace that, on a heavy attack, would launch a large rock forward to hit and damage an opponent. I have made similar scripts a multitude of times, but I wanted this one to deal crushing damage since it is launching a large boulder. I noticed that when I set the damage type to crushing in the throw command, nothing would happen, and nothing in the "On entity hit" and "On ground hit" parts of the throw command, such as particle effects and sounds, would happen either. I tested the same script on other weapons and it was providing the same results, so I changed the damage type next, and after changing just the damage type to Pure, everything started working as intended.
  6. Azazil00

    Naru's Corner #4 - Sentry Turrets

    You talked about spawning in the turret by placing an item, would you care to elaborate as to how to actually do that? I've made a "magic" based turret and want to have a skill that spawns in the turret, but I'm unsure how to spawn the turret as a whole and have it still function correctly.
  7. Azazil00

    Throw objects to camera aimed direction

    So I have recently discovered skills, and there is a way to activate "Aim Mode" in a skill but this may not be what you are looking for. Its just a modal state in a skill that makes it activate aim mode like if you were using a gun whenever you equip the skill.
  8. Azazil00

    RESOLVED Bug with Path editing

    It happened right before I posted that
  9. I was trying to edit a path, and when I was done it wouldn't exit the editing mode. Neither the Esc key or the "Done" button would work
  10. Azazil00

    UNDER REVIEW [YLD-26550] Potential bug with Skill

    Alrighty, thank you!
  11. So I'm currently trying to create a skill that launches a projectile, and I want the projectile to have a trajectory in an arc shape, like if I hurled a large boulder. So to do this, I've got gravity enabled, and I wanted to utilize the vertical Angle Delta to shoot the projectile upward at a small angle and have gravity pull it down. From the looks of it, the angle you put in only works depending on what horizontal direction you are facing. On one horizontal axis, facing one direction, the angle is correct and positive. If you change direction on the same axis (turn 180 degrees), the angle then becomes negative and shoots the projectile straight into the ground. If you look to either direction on the other horizontal axis (turn 90 or -90 degrees) it seems that the angle turns to zero. I think something may be going on in the code that makes this work, but I am posting it here instead of on the bugs page because I am unsure if this is intended or not. If it is intended and I am misinterpreting how to use Vertical Angle Delta when shooting a projectile in the skill editor, please explain to me how this parameter actually works, as the Horizontal Angle Delta seems to work as intended (or at least how I would intend it).
  12. Sorry this is so late of a reply, but it seems that with the latest update that this has been fixed. Thank you very much!
  13. So I make compositions of magic staves that do certain things, usually throwing an object when I attack. I add in particle effects to make things look more magical and I customize the particle effects to match the theme of my staff. Since the latest update, the particle effects do not play correctly much of the time. Keep in mind that I haven't changed anything in my compositions, and occasionally it will work correctly, but not for long. What exactly is going on is I use the throw command to shoot a projectile out, and when that projectile hits a target or the ground a custom particle effect would play at the location of the impact. I also use them at location of the end of the staff when attacking. This used to work just fine, with no problems. But after the Watery Waters update, I noticed that for the first couple uses, the effects will play correctly, but after that they turn to their default look. I'm not sure what else could be doing this besides a bug, unless something was changed and I did not know. Either way I'd really like to figure out a solution to this bc my compositions do not look so great anymore. Any help is greatly appreciated. Thank you.
  14. Azazil00

    How do you get a position in front of the player?

    There is a better way than using the reference point. It's what I use to make some magic weapons and things. You'll need to be able to reference the player in the visual script, so you'll need to be able to get your characters position and rotation. all you need to do is copy the Position tab in this picture. The picture is basically an example of a particle effect playing in front of the caster at a set distance and height. it is basically getting the position of your player and adding a set value for distance and height in the direction you're facing. I the VECTOR tab, X and Z are what is getting your rotation. The Y value is how high off the ground you want your point to be. The last number in the Position tab is how far you want your point to be in front or (if negative) behind your character. Extra Explanation: in the VECTOR tab X and Z are getting the Sin and Cos of the Y value of your character's rotation. The Y value of your character's rotation is the degree at which your character is rotated. When you plug the Sin in the X spot and the Cos in the Z spot, they cancel out to give you the direction you're facing. There is another post in these forums that explains that better, something about throwing a ball or something.
  15. Azazil00

    Throw objects to camera aimed direction

    The only thing I know of is throwing entities in the direction your character is facing. I still don't know if there is a way to reference the camera's direction. I would like to find this out as well though.
  16. Azazil00

    AI behavior questions

    Is there any way to set who/what NPC's will be aggressive towards? As of right now, all I can see right now is that the AI Behavior options always reflect back to their actions toward the player, but no actions toward other NPCs. I've also noticed that NPC's dont shoot projectile weapons. Is there just some set up that I need to learn how to do, or is this something that just isn't in the game?
  17. Azazil00

    Particle effects on thrown entities?

    I appreciate the response. I think I'll just wait until it gets implemented with the "Throw Entity" command because I can't seem to get it to work with what I am doing. I'm trying to make a weapon that can shoot a projectile (an entity like an acacia sapling) out and have a particle effect attached to that entity when it is thrown. I've made a few weapons already that use the throw command to do this, but I'd like to give it that extra touch with particles. I tried using the Spawn Entity and the Follow command but I had some issues. I tried using a reference point/trigger zone that follow the player with an offset that puts it in front of the caster at all times. That part worked. I then tried to make the projectile that was spawned follow that reference point/trigger zone, but when I do, it spawns the entity, but it never moves and always says something needs to be animated. I made sure everything that I was working with was ticked for animated. I was using the "On attack" event too. I'm not sure what to do at this point but wait on the particle effects for the throw logic as I'm not too familiar with the way Follow works. Thank you though for the response, can't wait for the update.
  18. Is there currently any way to get particle effects to play on entities that are in the process of being launched due to the "Throw Entity" command?
  19. Azazil00

    Particle effects on thrown entities?

    I've tried applying a particle template to the entity in the entity template that is used in the "Throw Entity" command, but it only throws the entity without the particle effect attached. At this point, I'm not sure what else to do to get it to work
×