You are not logged in.
Pages: 1
Hello i'm Alexander Gutierrez.
I'm from Uruguay
I was making a hack of this game called Open Sonic Generations
In Sonic Generations Real can do the boost and homing attack.
I wonder if changing the sprites could be.
Thank you and respond
Offline
Hello i'm Alexander Gutierrez.
I'm from UruguayI was making a hack of this game called Open Sonic Generations
In Sonic Generations Real can do the boost and homing attack.
I wonder if changing the sprites could be.
Thank you and respond
you want to do homing attack and boost?
Offline
They're both really good moves. Thugh they would be very hard to script.
My Souncloud
My YouTube Channel
Offline
the only way i see a homing attack possible, is when it is ready to be performed, all enemies on screen compare their positions to the player, and the closest one gets homed in. might be hard to do though...
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
Hey all,
I have two ideas: an object property targetable
and a function target_list that returns an array.
object some_object
{
targetable
...
state "main" {
$enemylist = target_list();
//iterate over the list
...
}
}
An ideal convenience function would be nearest_target.
Would the engine even allow that?
-- svgmovement
Offline
Hey all,
I have two ideas: an object property targetable
and a function target_list that returns an array.object some_object { targetable ... state "main" { $enemylist = target_list(); //iterate over the list ... } }
An ideal convenience function would be nearest_target.
Would the engine even allow that?
It might, however you must consider this could have unfortunate implications for bugs. For example, let's say you have a field where there is an enemy moving through the brick below the player and one in front of him on a hill. If it locked onto and hit the enemy inside the brick you have effectively created a bug by letting the player get into the middle of a brick. I'm not sure how the engine handles that, but it could potentially result in some very broken gameplay. Also, angles have caused odd bugs in the past for me as well. I am not certain how they would handle having the player hit them at a really high speed from an unexpected angle. Not to mention the kind of slowdown that could be introduced if that array was not handled entirely correctly.
Overall I say it would be a hard task to write and an even harder one to bugfix. The Boost shouldn't be too terribly difficult, just have it set player's x speed to a certain negative amount if the player is facing left or a certain positive amount if the player is facing right. Then, put in a variable to track how much boost power they have left and another variable that disables it altogether so that you can put in cliffs and stuff that they aren't just going to keep going right or left on. In fact, you could set a whole ton of variables that allow for different x,y speed combinations, the more complex you get though the more objects it will require to set and manage various boost types.
Good luck :-).
If I knew then what I know now I'd tell you that the story's true. Cause whatever you do, it comes back to you. -Slaughter, Burning Bridges
Offline
That bug could be easily fixed if we had
if_object_overlaps_brick(objid, state)
if_object_inside_brick(objid, state)
Offline
oh, a homming attack could be made by using a simple trick.
1. let's say that all enemies spawn a hidden object, ".enemy.position_exporter", that is always attached to them. You can attach it by asking each parent object (the enemies) what their position is.
2. when the player is to launch the homming attack, you
change_closest_object_state ".enemy.position_exporter" "@get_position"
3. then, the hidden object exports its position to global variables and
return_to_previous_state
4. now the player already knows the position of the closest enemy. You do the rest.
tada!
Offline
Alex, how can we ask the parent what its position is without state changes that break the object's flow? I can see how it could be done if we could call parent_x() and parent_y(), but I also know how much work it would be for the engine to maintain such a big table if the number of enemies got too large in a level.
If I knew then what I know now I'd tell you that the story's true. Cause whatever you do, it comes back to you. -Slaughter, Burning Bridges
Offline
it's pretty easy. When you call change_parent_state, change_child_state or change_closest_object_state, the code of the state of the other object (parent/child/closest) will be executed immediately. If, by the end of that state, you call return_to_previous_state, then the object's flow is unmodified.
This is pretty much like a function call, in imperative programming languages.
You don't need parent_x(), nor parent_y(). You just need to export parent's xpos() and ypos() to global variables, and then return_to_previous_state. I'm using this technique in some of my scripts.:)
Offline
How would this work, It was probably hard enough for sega, plus, homing attack wouldn't really work for a classic style game.
Sonic: What does heya mean???
Tails: It means Hel...
Sonic: Shut it Tails!
Tails: Ok, I'll just talk to my real friend. He's a mutant wisp you know!
Offline
How would this work, It was probably hard enough for sega, plus, homing attack wouldn't really work for a classic style game.
Meh, I don't think so, I think it's a really cool move and should've been in the classic games
My Souncloud
My YouTube Channel
Offline
the only way i see a homing attack possible, is when it is ready to be performed, all enemies on screen compare their positions to the player, and the closest one gets homed in. might be hard to do though...
yes very i had my self make a object called doom it's a basic object though
object "DOOM"
{
always_active
State "main"
{
set_animation "SD_EXPLOSION2" 0
on_player_collision hit_player
change_state "protected"
}
state "protected"
{
if $x==1 give_rings
Change_state "main"
}
state "hit_player"
{
hit_player
Change_state "main"
}
state "destroy"
{
destroy
}
state "disable"
{
Change_state "destroy"
}
}
well that's how you make it.
Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.
Offline
Error in script.
where is the state "give_rings"?
Offline
also, you have not defined $x, you should declare a variable before calling it.
example:
let $x = 0
if $x == 1 next_state
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
uhh... i do not know where that came from
but here is a example
"attack"
(
on player jump "homing"
change state "disable"
state "disable"
(
disable
)
state "homing"
(
attach to player
)
so that is my solution try to finish it but i would NOT recommend to copy this it is a example.
Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.
Offline
ok so use a object that target's the enemy and use the exporter so by using the target sprite by silverstepP
you can target the enemy and thus homing attack see
Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.
Offline
What? That made no sense. Can you try to use better punctuation so we could understand better?
My Souncloud
My YouTube Channel
Offline
i had spoken like that and it does not make any sense my sisters and brother can not even hear what i say
ok if on any matter to do this use the object location exporter like alex. was talking about so use a targeting sprite
and so when the enemy gets closer jump and the object which is attached to the player gets going causing homing attack
Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.
Offline
so actuator --------- movement example "xsonic = 50" ysonic = 50
------------------------------------------------------------------------------------------
so then add that up he goes 50 in a diagonal motion
also.
-------------------------------------------------------------------------
actuator ---------------------------- homing attack
movement----------/
attach--------------/
Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.
Offline
here is something like boost first put this into there.
inputmap "default"
{
keyboard
{
up KEY_UP // up arrow key
right KEY_RIGHT // right arrow key
down KEY_DOWN // down arrow key
left KEY_LEFT // left arrow key
fire1 KEY_SPACE // space bar (jump)
fire2 KEY_LCONTROL // left ctrl (switch character)
fire3 KEY_ENTER // enter (pause game)
fire4 KEY_ESC // escape (leave game)
fire5 KEY_C // extra
fire6 KEY_V // kick
fire7 KEY_X // s
fire8 KEY_B // boost (certain chr.)
}
then go to the objects folder go to sonic inc/obj
then enter...
object ".sonic_boost_controller"
{
requires 0.2.0
always_active
hide_unless_in_editor_mode
state "main"
{
hide
set_animation "SD_sonic" 1
observe_player "sonic"
change_state "ready"
}
state "ready"
{
on_button_down "fire8" "hit"
change_state "main"
}
state "hit"
{
let "$direction = player_direction()"
on_timeout 0.175 "go"
}
state "go"
{
if "$direction == -1" "left"
if "$direction == 1" "right"
change_state "main"
}
state "right"
{
simulate_button_up "left"
simulate_button_down "right"
set_player_xspeed 1000
change_state "main"
}
state "left"
{
simulate_button_up "right"
simulate_button_down "left"
set_player_xspeed -1000
change_state "main"
}
}
then add at the top of the file enter...
object ".sonic_companion"
{
requires 0.2.0
always_active
state "main"
{
create_child ".sonic_spindash_controller"
create_child ".sonic_nolightwalk_controller"
create_child ".sonic_boost_controller"
destroy
}
}
so if this doesn't work then oh well...
Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.
Offline
Pages: 1