tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
@link.tothepast said:
To make things clear, I want to make characters that attack the player.
This is one of those cases where it's clear in your mind but not clear to anyone else. For example, what does it mean to "attack the player"? Is this a first-person shooter? A side-scrolling adventure game? Does the player move only up and down or in any direction or not at all? Do the enemies fall from the top of the screen at a set speed or do they move randomly?
I realize you may just be looking for starting points re: videos but for people here to offer suggestions, they really need to know a few more details.
@tatiang said:
I realize you may just be looking for starting points re: videos but for people here to offer suggestions, they really need to know a few more details.
I want to create a side scroller where when the player is trying to complete the level, other characters are trying to kill it. I want to create actors that attack the character that the player is controlling.
An example of this is in the game "Mighty Final Fight." When you are trying to complete the level, enemies attack you and you are trying to fend them off. That's what I meant by characters that attack the player.
Another example is in the "Mega Man" games. When you are trying to complete a level, whether it's the boss or not, enemies attack you when they see you. That's what I mean by having enemies attacking the player. Enemies attacking you.
Episode 9 in the video series above shows you how to create an enemy that will follow (or see) the player once the player gets close enough. This uses the Magnitude Function, I have another video specifically about that if you want to check it out.
You use the Magnitude Function to find the distance between two actors. Once you know how close they are you can have the enemy chase the player, shoot at the player or whatever you want for your attack type.
Yes, that's quite helpful. One way to get started with this is to use the constrain attribute behavior to constrain game attributes (type real) to the player's self.position.x and self.position.y and then use a rule with the magnitude expression in the rule condition to determine how close the enemy is to the player. And then to attack, you can use Move/Move To/Interpolate/etc.
Comments
Here are a few, no idea if this is what you really want though since your question is pretty vague.
You'll want to watch episodes 7, 8, and 9.
https://m.youtube.com/watch?list=PLImYl7cJ-0hu-OrvR_JN3eRk7Q-ooU9yY&v=HMj8NistLZs
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
To make things clear, I want to make characters that attack the player.
Hi,
in one of my projects I have opponents, too.
These run at certain points from left to right.
Did you mean something like that?
dapion.de
[https://twitter.com/dapionde?]
This is one of those cases where it's clear in your mind but not clear to anyone else. For example, what does it mean to "attack the player"? Is this a first-person shooter? A side-scrolling adventure game? Does the player move only up and down or in any direction or not at all? Do the enemies fall from the top of the screen at a set speed or do they move randomly?
I realize you may just be looking for starting points re: videos but for people here to offer suggestions, they really need to know a few more details.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I want to create a side scroller where when the player is trying to complete the level, other characters are trying to kill it. I want to create actors that attack the character that the player is controlling.
An example of this is in the game "Mighty Final Fight." When you are trying to complete the level, enemies attack you and you are trying to fend them off. That's what I meant by characters that attack the player.
Another example is in the "Mega Man" games. When you are trying to complete a level, whether it's the boss or not, enemies attack you when they see you. That's what I mean by having enemies attacking the player. Enemies attacking you.
Is that clear enough?
Yes, but they attack you when they see you. That's what I meant.
Episode 9 in the video series above shows you how to create an enemy that will follow (or see) the player once the player gets close enough. This uses the Magnitude Function, I have another video specifically about that if you want to check it out.
You use the Magnitude Function to find the distance between two actors. Once you know how close they are you can have the enemy chase the player, shoot at the player or whatever you want for your attack type.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Edit: @jamie_c beat me to it
Yes, that's quite helpful. One way to get started with this is to use the constrain attribute behavior to constrain game attributes (type real) to the player's self.position.x and self.position.y and then use a rule with the magnitude expression in the rule condition to determine how close the enemy is to the player. And then to attack, you can use Move/Move To/Interpolate/etc.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Yep, 'enemies' and 'attack the player' probably encompass a whole world of unsaid specificities that are only known to the OP.
In the context of your particular game, what does 'they see you' mean ?
I have a test project here.
The opponents follows the main actor, but is not yet attacked.
Do you mean this?
dapion.de/test1.mp4
dapion.de
[https://twitter.com/dapionde?]
You mean like this?