YesNoOk

Show content

This section allows you to browse the content for this member. Note that you can only see content for which you have sufficient viewing permissions.

**
Fighting Toys Freak is Offline
Contact Fighting Toys Freak:

Fighting Toys Freak

User

Messages by Fighting Toys Freak

    

How Do You Fix An Angling String Issue

 December 21, 2020, 03:41:01 AM View in topic context
 Posted by Fighting Toys Freak  in How Do You Fix An Angling String Issue (Started by Fighting Toys Freak December 21, 2020, 03:41:01 AM
 Board: M.U.G.E.N Development Help

How do I adjust the angle of the string helper such that it aligns with the distance between the spawner (aka the player or P1) and the spawned projectile?

1. Player's helper-spawning state of string and helper projectile
Spoiler, click to toggle visibilty

2. Player's "String" Helper Spawn State
Spoiler, click to toggle visibilty

3. Player's "Projectile" Helper Spawn State
Spoiler, click to toggle visibilty




WHY is this a problem?! :(
    

Re: Screen v.s. Helper question

 March 15, 2020, 09:59:33 PM View in topic context
 Posted by Fighting Toys Freak  in Screen v.s. Helper question (Started by Kolossoni March 05, 2020, 05:30:28 PM
 Board: M.U.G.E.N Development Help

Could you provide a sample of what you are talking about? I think a description of your predicament in question should, perhaps, include a screenshot of the issue as well as the problem algorithm.

Anyway, I suppose you should double-check any conflicting code triggers under the state definition #-2. Any possibly conflicting velocity state controllers would mess up the displacement of your helper player.

Also, check the state of the helper player's state-type and physics. If the physics is anything other than N, then it could cause issues with how the helper player moves normally.

Alternatively, you could use the state controller "PlayerPush" or "ScreenCamera" (I think) under the state definition #2, targeted to the helper player. Make sure that its primary parameter is set to 0, instead of 1 being the default. Or, you can remove the helper's Clsn2 boxes that would cause the camera to displace itself.

I have never used the "PosFreeze" state controller before. However, you can set the parameters for the "PosSet" state controller such that it always binds with the helper. Or, you can also add a "BindtoRoot" or "BindtoParent" state controller that makes sure that the helper stays with the normal character under specified conditions, such as binding with the player invariably.

I am having trouble understanding your question/inquiry. So, if there is any misunderstanding on my part, just make sure to point it out.
    

WHY IS THIS HAPPENING?!

 March 15, 2020, 04:33:48 PM View in topic context
 Posted by Fighting Toys Freak  in WHY IS THIS HAPPENING?! (Started by Fighting Toys Freak March 15, 2020, 04:33:48 PM
 Board: M.U.G.E.N Development Help

1. It appears that there is some issue with a line of code that I am trying to implement properly. There is an instance where, if the player becomes situated leftward from his opponent at a considerable distance, he would hope backward or move backward aerially. This predicament occurs whenever the player is in the "Jump" state number and "Run Back" state number (aka stateno). Additionally, this issue occurs whenever the player is facing leftward.

I figured out that the issue is stemming from the following code that I am using as an example:

Code:
...
facing*(pos x - 15) < (enemynear(1), pos x)
...
 
This line of code should trigger whenever the player's position along the x-axis is 15 pixels less than that of the NEAREST opponent's, regardless of his facing.

I did some beta-testing, and I am unsure if changing the above line of code would rectify the issue with the following:
Code:
...
(pos x - 15*(facing)) < (enemynear(1), pos x)
...

or

Code:
...
(pos x - 15) < (enemynear(1), pos x)* facing
...

The following should bring further clarity to this query:
Code:
...
[State -1, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = fvar(18) > 0 && facing = -1 && backedgebodydist < 50 && enemynear, alive
text = "Yes = %d"
params = ((pos x - 15*(facing)) >= enemynear, pos x)
ignorehitpause = 1
...

2. Is there a way I can condense the following trigger codes by not numbering the number of enemies nearby and alive:
Code:
...
trigger1 = enemynear(0), movetype != A || (facing = enemynear(0), facing)
trigger1 = Facing = 1
trigger1 = (pos x - 15) < (enemynear(0), pos x)
trigger1 = enemynear(0), pos y = [pos y-100,pos y+10]
trigger2 = enemynear(0), movetype != A || (facing = enemynear(0), facing)
trigger2 = Facing = -1
trigger2 = (pos x - 15) >= (enemynear(0), pos x)
trigger2 = enemynear(0), pos y = [pos y-100,pos y+10]
trigger3 = numenemy >= 2 && Facing = 1
trigger3 = enemynear(0), life > 0
trigger3 = enemynear(0), movetype != A || (facing = enemynear(0), facing)
trigger3 = ((pos x - 15) < (enemynear(0), pos x))
trigger3 = enemynear(0), pos y = [pos y-100,pos y+10]
trigger3 = enemynear(1), movetype != A || (facing = enemynear(1), facing)
trigger3 = ((pos x - 15) < (enemynear(1), pos x))
trigger3 = enemynear(1), pos y = [pos y-100,pos y+10]
trigger4 = numenemy >= 2 && Facing = -1
trigger4 = enemynear(0), life > 0
trigger4 = enemynear(0), movetype != A || (facing = enemynear(0), facing)
trigger4 = ((pos x - 15) >= (enemynear(0), pos x))
trigger4 = enemynear(0), pos y = [pos y-100,pos y+10]
trigger4 = enemynear(1), movetype != A || (facing = enemynear(1), facing)
trigger4 = ((pos x - 15) >= (enemynear(1), pos x))
trigger4 = enemynear(1), pos y = [pos y-100,pos y+10]
...


The reason why I structured the trigger codes in such a way is that I do not want the state controller to respond to a situation where the nearby opponent is dead and the non-nearby one is not. Would it be okay if I change it to something like this, for example:
Code:
...
trigger1 = enemynear, alive
trigger1 = (facing)*(pos x - 15) > enemynear, pos x)
...

Please provide any suggestions for both queries!!
    

Re: Elongating Clsn1 box Along with Scaling?

 December 21, 2019, 02:01:05 PM View in topic context
 Posted by Fighting Toys Freak  in Elongating Clsn1 box Along with Scaling? (Started by Fighting Toys Freak December 20, 2019, 10:07:57 PM
 Board: M.U.G.E.N Development Help

clsn boxes are not scaled.
The only way to fix that is to have different sized clsn boxes in the animation, and then change to the correspoding anim/animelem based on the angledraw scale

Could I align the Clsn1 hitbox of the attack's animation with a Width-type state controller? I think adjusting the scaling by the corresponding animation will be both tedious and messy, in my opinion.

Here is a line of code that I think will work:
Instead of...
Code:
...
[State 0, AngleDraw]
type = AngleDraw
trigger1 = fvar(0) != 0
value = Atan((fvar(1)*3)/(fvar(0)*133))
scale = -facing*fvar(0), 1
ignorehitpause = 1
...

I could use this:
Code:
...
[State 0, Width]
type = Width
trigger1 =1
edge = 0,0
player = 0,0
;value = -facing*fvar(0)/133,-facing*fvar(0)/133
ignorehitpause = 1
...

Or, alternatively:
Code:
...
;Would spawn a helper once per helper
[State 0, Helper]
type = Helper
trigger1 = var(3) < ceil(fvar(0)/133)
ID = 223
stateno = 223
pos = 0,0
ownpal = 1
persistent = 0

[State 0, VarSet]
type = VarSet
v = 3
value = (Parent, Var(3)) + 1
...

The variable, fvar(0), represents the length at which the attack should extend between the parent and its opponent.

Any suggestions?
    

Elongating Clsn1 box Along with Scaling?

 December 20, 2019, 10:07:57 PM View in topic context
 Posted by Fighting Toys Freak  in Elongating Clsn1 box Along with Scaling? (Started by Fighting Toys Freak December 20, 2019, 10:07:57 PM
 Board: M.U.G.E.N Development Help

Hey.

While debugging, I noticed that an attack's Clsn1 hitbox does not align with its scale.

I would like to know how I can execute a state controller that would call to expand a Clsn1 hitbox for an attack. I do not understand how the Clsn1 hitbox of the attack's animation does not change in proportion to the attack's scale. The scale of the attack's animation is a result of the modification of its scaling parameter from the AngleDraw-type state controller. Here is a depiction of the issue:
Code:
...
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Atan((fvar(1)*3)/(fvar(0)*133))
scale = -facing*fvar(0), 1
ignorehitpause = 1
...



Any suggestions?
 
    

Wall Bounce Issue?!

 August 02, 2019, 05:19:32 PM View in topic context
 Posted by Fighting Toys Freak  in Wall Bounce Issue?! (Started by Fighting Toys Freak August 02, 2019, 05:19:32 PM
 Board: M.U.G.E.N Configuration Help

Hey, all.

I will like to know as to how I could cause a target of a player's attack to bounce off a wall. Sorry if this sounds like a simple coding/programming feature.
    

Re: "All Attacks Detection" Algorithm Issue

 March 08, 2019, 02:13:13 PM View in topic context
 Posted by Fighting Toys Freak  in "All Attacks Detection" Algorithm Issue (Started by Fighting Toys Freak March 04, 2019, 06:08:58 PM
 Board: M.U.G.E.N Development Help

Thanks for your questions, Odb718.

To clarify furthermore, the player's helper refers to the helper with the "ReversalDef" algorithm in question; the opponent's attack refers to the attacking opponent, and the opponent's helper...well...refers to the attacking opponent's helper. That is the extent to which I can simplify the variables at play; I hope that my explanation dispels your confusion.

Now, about testing the algorithm against an opponent's attack whose "HitDef" state controller possesses a "hitonce" parameter, ...yeah...I have already done so. The problem is that the mentioned "HitDef" state controller of the player's helper has been interrupting any attacking opponent whose moves use the "HitOnce = 1" parameter.

UPDATE - Think of this endeavor like creating a sensory algorithm for the player: if an opponent's movetype is A and the sensory helper (invisible) does get triggered off, then the player will not react; otherwise, the player would act in defense before the attacking opponent can make contact with the player.

So, could anybody suggest as to how can I prevent the interruption from happening in such instances, while implementing the desired effect(s) in question?
    

How do I create an algorithm that recognizes the attributes of an enemy's spawns

 March 08, 2019, 01:56:08 AM View in topic context

I know that the M.U.G.E.N software has no known trigger commands that detect specific attributes associated with the opponents' helpers and projectiles, such as "enemynear, helper(700), p2bodydist X", "enemynear, projdist X", etc.

Could anybody propose any algorithms that can detect the distance of the opponent's helper and projectiles from the player, the speed of any opponent's helper, and whether or not an opponent's attack lacks a guardflag parameter (unguardable) while still having the chance to make contact with the actual player?

All suggestions will be considered.
    

Re: "All Attacks Detection" Algorithm Issue

 March 08, 2019, 01:41:57 AM View in topic context
 Posted by Fighting Toys Freak  in "All Attacks Detection" Algorithm Issue (Started by Fighting Toys Freak March 04, 2019, 06:08:58 PM
 Board: M.U.G.E.N Development Help

Thanks for the advice, DrKelexo.

In regards to using the "HitOverride" state controller instead of the "ReversalDef" state controller, I cannot do that: you see, I have been attempting to prevent any opponent's attack from being interrupted by the helper because the helper will become affected by the opponent's attack rather than the player. Instead, because the helper is invisible, its "HitDef" state controller is only intended to cause the attacking opponent or opponent's helper to "dodge" their "HitDef" state controllers and, consequently, send the player's helper state to its reversal state, i.e. state #904 (see previous). Hence, the detection algorithm is not intending to interrupt the opponent's attack. This way, the attacking opponent or opponent's helper still has the chance to make contact with the actual player.

Sorry for the wall of text if you find it as confusing.

So, could anybody advise me as to how I can achieve this clarified, desire effect while maintaining the "ReversalDef" state controller?

UPDATE - Think of this endeavor like creating a sensory algorithm for the player: if an opponent's movetype is A and the sensory helper (invisible) does get triggered off, then the player will not react; otherwise, the player would act in defense before the attacking opponent can make contact with the player.
    

"All Attacks Detection" Algorithm Issue

 March 04, 2019, 06:08:58 PM View in topic context
 Posted by Fighting Toys Freak  in "All Attacks Detection" Algorithm Issue (Started by Fighting Toys Freak March 04, 2019, 06:08:58 PM
 Board: M.U.G.E.N Development Help

Hey all,

I have been attempting to implement a detection algorithm that enables the player to modify its movements for dodging attacks dished out by its opponent(s). I have incorporated a reversal state controller in an effort to accomplish this goal. Furthermore, I have added the "Dodge v Dodge" string alongside the "priority =" parameter under the "HitDef" state controller to avoid opponents from being interrupted of their attacks, however to no avail. Here are examples of my algorithm:
Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty

How should I modify this algorithm to produce its desired effect?
UPDATE - Think of this endeavor like creating a sensory algorithm for the player: if an opponent's movetype is A and the sensory helper (invisible) does get triggered off, then the player will not react; otherwise, the player would act in defense before the attacking opponent can make contact with the player.

All suggestions will be considered.
    

ChangeAnim2 Confusion

 January 16, 2019, 05:44:33 PM View in topic context
 Posted by Fighting Toys Freak  in ChangeAnim2 Confusion (Started by Fighting Toys Freak January 16, 2019, 05:44:33 PM
 Board: M.U.G.E.N Development Help

Hey all,

I have intended to have any opponent that -- when in a get-hit, custom state -- changes its animation triggered by a series of animation element numbers instructed from the causative player's program. A piece of the code shows as follows:

Code:
[State 0, Turn]
type = ChangeAnim2
trigger1 = enemy(0), name = "char" && enemy(0), authorname = "authorname"
trigger1 = ID = (enemy(0), var(16))
trigger1 = enemy(0), Anim = 101
trigger1 = enemy(0), AnimElem = 2
value = 5002

[State 0, Turn]
type = ChangeAnim2
trigger1 = enemy(0), name = "char" && enemy(0), authorname = "authorname"
trigger1 = ID = (enemy(0), var(16))
trigger1 = (enemy(0), Anim = 101)
trigger1 = enemy(0), Anim = 101
trigger1 = enemy(0), AnimElem = 3
value = 5000

The rest of the trigger commands that I have examined from both state controllers executes fine; however, the last set of ones, i.e. the "enemy(0), AnimElem =" ones, has been the only problem, because the system presumably fails to recognize the code in-game at the specific moments.

I have tried to verify the implementation of the code in debug mode; however, the trigger command in question outputs nothing at the call of action:
Code:
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = !IsHomeTeam && gethitvar(isbound) = 1
text = "ver = %d"
params = enemy(0), AnimElem = 2


Please propose any ideas as to how I can implement the desired effect from any opponent in the get-hit, custom state.

I consider all suggestions.
    

Re: Scaling Explod Helper Relative to Parent's Distance

 May 04, 2017, 01:56:50 AM View in topic context
 Posted by Fighting Toys Freak  in Scaling Explod Helper Relative to Parent's Distance (Started by Fighting Toys Freak April 29, 2017, 11:46:25 PM
 Board: M.U.G.E.N Development Help

You never just answer the questions. We both asked if it can travel vertically. There's no concise answer to that question. But we can surmise it can by the use of angles.

I fully understand the effect you're trying to accomplish. What I am telling you is that you want an equation, not a whole number there.
Is 133 the actual width of your sprite or something? Why did you choose 133 as the denominator?

The value, 133, is the actual width of the sprite. I am trying to have the sprite stretch horizontally and not travel toward any direction. In addition, I am aiming for the helper's sprite to rotate at an angle whenever the parent travels vertically.

For instance, suppose that the helper's parent travels toward a distance of 266 from the helper along the x-axis and that the helper's position along the x-axis is 56. The helper as a result stretches to double of its width. The position at where the end of the helper's sprite will displace from where it was originally called. Some equation in the offset parameter along the x-axis will then be prompted to correct the displacement of the end of the sprite back to its original position.

In a different yet another instance, suppose that the helper's parent travels down at distance of 266 below the helper along the y-axis and at a distance of 266 along the x-axis. The same case as before will apply to the helper's sprite expanding across the x-axis.  However, the sprite rotates at angle toward the position at which the parent is along the y-axis. This is when the AngleDraw controller will be called to rotate the sprite so that it corresponds to the resultant of the parent's velocity/distance.

Therefore, how would I formulate an equation for the parameters of both the AngleDraw and Offset controllers while satisfying both instances?

I hope this information suffices.
    

Re: Scaling Explod Helper Relative to Parent's Distance

 May 03, 2017, 09:49:43 PM View in topic context
 Posted by Fighting Toys Freak  in Scaling Explod Helper Relative to Parent's Distance (Started by Fighting Toys Freak April 29, 2017, 11:46:25 PM
 Board: M.U.G.E.N Development Help

I intend for the helper to shift, or move, to the same position that has been set prior to its elongation. In other words, it is supposed to return to the same position that it was originally so as to correct the displacement of the helper's animation while the animation elongates. This is the intended purpose of the Offset controller. I have tried binding the helper in respect to the player's position, however to no avail.

I have not figured out on how I should factor in the float variable whose expression is supposed to compute a numerical angle.

It seems that I need to clarify the purpose of the value of 133: the reason why the value, 133, is in the denominator of the expression is that the width of the animation changes as the distance of the parent increases in respect to the width of the animation. Therefore, the animation should elongate based on the distance of the parent from its helper and offset the new position to its original according to the width of the animation.

The expression alongside the parameters of the Offset and AngleDraw controllers seems to be the main issue.

How should I change the expression to account for the distance of the parent and the angle of the helper?

I hope the information satisfies your questions, altoiddealer and odb718.   
    

Re: Scaling Explod Helper Relative to Parent's Distance

 April 30, 2017, 06:54:46 PM View in topic context
 Posted by Fighting Toys Freak  in Scaling Explod Helper Relative to Parent's Distance (Started by Fighting Toys Freak April 29, 2017, 11:46:25 PM
 Board: M.U.G.E.N Development Help

It seems that I need to clarify the issue of the matter: I am not implying that the execution is not functioning; I meant to state that the execution is not what I intended to happen. The helper elongates too far across the screen, and its position does not restore to its original position as a consequence of the AngleDraw controller's scale parameter.

Perhaps, the algorithm of the AngleDraw controller's scale parameter or algorithm of the Offset controller is incorrect. Or maybe both. The following code could be the underlying issue:
Code:
;Finds the X component of the vector Player, EnemyNear
;Formula to find the components of a given vector AB
;V(x) = B(x) - A(x)
;V(y) = B(y) - A(y)
[State 1640, X]
Type = VarSet
Trigger1 = 1
fvar(0) = ParentDist X * Facing ;Adjust the direction towards player facing

;Finds the Y component of the vector Player, EnemyNear
[State 1640, Y]
Type = VarSet
trigger1 = 1
fvar(1) = ParentDist Y

;Finds the vector length
;Formula of the length of a given vector AB
;|AB| = (AB(x)^2 + AB(y)^2)^1/2
[State 1640, Vector Length]
Type = VarSet
trigger1 = 1
trigger1 = fvar(0) > 0
fvar(2) = Atan(fvar(1)/fvar(0))*-270/Pi

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = abs(ParentDist X/133),1
ignorehitpause = 1

[State 0, AngleSet]
type = AngleSet
trigger1 = 1
value = fvar(2)

[State 0, Offset]
type = Offset
trigger1 = ParentDist X != 0
x = abs(ParentDist X/133)
ignorehitpause = 1
 

What could be wrong with the algorithm(s)?
    

Scaling Explod Helper Relative to Parent's Distance

 April 29, 2017, 11:46:25 PM View in topic context
 Posted by Fighting Toys Freak  in Scaling Explod Helper Relative to Parent's Distance (Started by Fighting Toys Freak April 29, 2017, 11:46:25 PM
 Board: M.U.G.E.N Development Help

Hey all.

I am attempting to enlarge a helper's width relative to its player's distance. However, the following code does not execute the phenomenon that I had planned:

Code:
[State 1640, X]
Type = VarSet
Trigger1 = 1
fvar(0) = (Parent, Pos X - Pos X) * Facing ;Adjust the direction towards player facing

;Finds the Y component of the vector Player, EnemyNear
[State 1640, Y]
Type = VarSet
trigger1 = 1
fvar(1) = (Parent, pos Y - Pos Y)

;Finds the vector length
;Formula of the length of a given vector AB
;|AB| = (AB(x)^2 + AB(y)^2)^1/2
[State 1640, Vector Length]
Type = VarSet
trigger1 = 1
fvar(2) = Atan(fvar(1)/fvar(0))*-270/Pi

[State 0, AngleSet]
type = AngleSet
trigger1 = 1
value = fvar(2)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = abs(ParentDist X/133),1
ignorehitpause = 1

[State 0, Offset]
type = Offset
trigger1 = ParentDist X != 0
x = abs(ParentDist X/133)*(pos x)*facing
ignorehitpause = 1

In addition, I am attempting to offset the helper's position as the helper enlarges.

What could be wrong with the code?
    

Re: Improper Angling and Faulty Target-Drop

 December 04, 2016, 12:18:56 AM View in topic context
 Posted by Fighting Toys Freak  in Improper Angling and Faulty Target-Drop (Started by Fighting Toys Freak November 25, 2016, 02:57:40 AM
 Board: M.U.G.E.N Development Help

Thanks, all; your suggestions worked.

However, the player's angling problem still persists.

A portion of the player's code fails at angling the player and his projectile toward the nearest opponent. At times, the player would face toward the opposite direction from where the opponent is or the projectiles would not rotate an angle and fly upwards. Other times, he and his projectiles would not point toward the direction of the nearest foe. Incidentally, the projectiles' assigned velocities work fine. The following code should adequately contain some logical errors of execution:

Code:
;Player's Code for Angular Rotation
[State -3, Distance Between Player and the Nearest enemy]
Type = VarSet
trigger1 = time = 0
fvar(10) = Exp(0.5*ln((((EnemyNear(0), Pos X) - (Pos X)) * (( EnemyNear(0), Pos X) - (Pos X)) + ((EnemyNear(0), Pos Y - Pos Y) * (EnemyNear(0), Pos Y - Pos Y)))))

[State -3, M]
[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
triggerall = time = 0
trigger1 = EnemyNear(0), Pos X >= Pos X
trigger1 = EnemyNear(0), Pos Y <= Pos Y
fvar(11) = 0

[State -3, Angle]
Type = VarSet
trigger1 = time = 0
trigger1 = EnemyNear(0), Pos Y > Pos Y
fvar(12) = ifelse((facing = 1),Atan(fvar(11)) * (180.0/Pi), -Atan(fvar(11)) * (180.0/Pi)) ;Angle given in degrees.

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = facing*fvar(12)

Code:
;Helper's Code of Rotation
[State -3, M]
Type = VarSet
triggerall = time = 0
trigger1 = parent,fvar(11) != 0
fvar(11) = parent,fvar(11)

[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
triggerall = time = 0
trigger1 = Enemynear(0), alive && EnemyNear(0), Pos Y <= Pos Y
trigger1 = EnemyNear(0), Pos X <= Pos X
fvar(11) = 0

[State -3, Angle]
Type = VarSet
trigger1 = time = 0
trigger1 = EnemyNear(0), Pos Y > Pos Y
fvar(12) = Atan(parent,fvar(11)) * (180.0/Pi) ;Angle given in degrees.

;[State 0, AngleAdd]
;type = AngleAdd
;trigger1 = fvar(11)
;trigger1 = time = 0

[State 0, AngleSet]
type = Angledraw
trigger1 = fvar(11) != 0 && statetype != S
value = (fvar(12))*facing
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = A
trigger1 = parent, fvar(10) > 0
x = ifelse(!(movehit), (parent, fvar(13)/parent,fvar(10)*facing) * 8.0,24)
y = ifelse(!(movehit),(parent, fvar(14)/parent,fvar(10)*facing) * 8.0,24)

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = S
trigger2 = !(parent, fvar(10)) && time = 1
x = ifelse(!(movehit),8.12,0)
y = ifelse((parent, statetype = S),0,ifelse(!(movehit),8.12,24))
    

Re: Improper Angling and Faulty Target-Drop

 November 25, 2016, 10:00:46 PM View in topic context
 Posted by Fighting Toys Freak  in Improper Angling and Faulty Target-Drop (Started by Fighting Toys Freak November 25, 2016, 02:57:40 AM
 Board: M.U.G.E.N Development Help

That seems to work. However, adding that line of code created another problem in the custom state. When the target is suspended in the state number 820, the target's animation is its run/walk animation:

Code:
[Statedef 820]
type    = A
movetype= H
physics = N
anim = 5000
velset = 0,0
sprpriority = 2

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5000

[State 0, PalFXWiz]
type = PalFX
trigger1 = enemy, stateno = 2001
time = (enemy, stateno = 2001)
add = 100,100,180
mul = 256,256,256
sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = gethitvar(isbound) = 0
value = 821
ctrl = 0
;anim =
;ignorehitpause =
;persistent =

What could be the source of this problem? Any suggestions?
 
    

Improper Angling and Faulty Target-Drop

 November 25, 2016, 02:57:40 AM View in topic context
 Posted by Fighting Toys Freak  in Improper Angling and Faulty Target-Drop (Started by Fighting Toys Freak November 25, 2016, 02:57:40 AM
 Board: M.U.G.E.N Development Help

All suggestions will be considered.

A portion of the player's code fails at angling the player and his projectile toward the nearest opponent. At times, the player would face toward the opposite direction from where the opponent is or the projectiles would not rotate an angle and fly upwards. The following code should adequately contain some logical errors of execution:

Code:
;Player's Code for Angle Rotation
[State -3, Distance Between Player and the Nearest enemy]
Type = VarSet
trigger1 = time = 0
fvar(10) = Exp(0.5*ln((((EnemyNear(0), Pos X) - (Pos X)) * (( EnemyNear(0), Pos X) - (Pos X)) + ((EnemyNear(0), Pos Y - Pos Y) * (EnemyNear(0), Pos Y - Pos Y)))))

[State -3, M]
Type = VarSet
triggerall = time = 0
trigger1 = EnemyNear(0), Pos X >= Pos X
trigger1 = EnemyNear(0), Pos Y > Pos Y
fvar(11) = -((EnemyNear(0), Pos Y - Pos Y)/(EnemyNear(0), Pos X - Pos X))

[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
triggerall = time = 0
trigger1 = EnemyNear(0), Pos X >= Pos X
trigger1 = EnemyNear(0), Pos Y <= Pos Y
fvar(11) = 0

[State -3, Angle]
Type = VarSet
trigger1 = time = 0
trigger1 = EnemyNear(0), Pos Y > Pos Y
fvar(12) = Atan(fvar(11)) * (180.0/Pi) ;Angle given in degrees.

[State -3, Angle]
Type = VarSet
trigger1 = time = 0
trigger1 = EnemyNear(0), Pos Y > Pos Y
fvar(13) = (EnemyNear(0), Pos X - Pos X) ;Angle given in degrees.

[State -3, Angle]
Type = VarSet
trigger1 = time = 0
fvar(14) = (EnemyNear(0), Pos Y - Pos Y)*facing ;Angle given in degrees.

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = facing*fvar(12)

Code:
;Helper's Code of Rotation
[State -3, M]
Type = VarSet
triggerall = time = 0
trigger1 = Enemynear(0), alive && EnemyNear(0), Pos Y > Pos Y && EnemyNear(0), Pos X > Pos X
fvar(11) = -((EnemyNear(0), Pos Y - Pos Y)/(EnemyNear(0), Pos X - Pos X))

[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
triggerall = time = 0
trigger1 = Enemynear(0), alive && EnemyNear(0), Pos Y <= Pos Y
trigger2 = EnemyNear(0), Pos X <= Pos X
fvar(11) = 0

[State -3, Angle]
Type = VarSet
trigger1 = time = 0
trigger1 = EnemyNear(0), Pos Y > Pos Y
fvar(12) = Atan(fvar(11)) * (180.0/Pi) ;Angle given in degrees.

[State 0, AngleAdd]
type = AngleAdd
trigger1 = parent, statetype = A
trigger1 = parent, fvar(10) > 0
trigger1 = time = 0

[State 0, AngleSet]
type = Angledraw
trigger1 = parent, statetype = A
trigger1 = parent, fvar(10) > 0
trigger1 = 1
value = (fvar(12))*facing

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = A
trigger1 = parent, fvar(10) > 0
x = ifelse(!(movehit), (parent, fvar(13)/parent,fvar(10)*facing) * 8.0,24)
y = ifelse(!(movehit),(parent, fvar(14)/parent,fvar(10)*facing) * 8.0,24)

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = S
trigger2 = !(parent, fvar(10)) && time = 1
x = ifelse(!(movehit),8.12,0)
y = ifelse((parent, statetype = S),0,ifelse(!(movehit),8.12,24))
;-------------------------------------------

In addition to the problems with the player's code implementations, the player has a faulty target-drop command. Sometimes, the target stays in a get-hit state despite the player leaving from a state that initiates it. The following code should sufficiently illustrate my plan of implementation for the bug:

Code:
[State -2, TargetDrop]
type = TargetState
triggerall = numtarget(820)
triggerall = target(820), stateno = 820
trigger1 = movetype = H
trigger2 = stateno != 800
trigger2 = stateno != 810
trigger2 = stateno != 822
trigger2 = stateno != 823
trigger2 = stateno != 2001
value = 821
ignorehitpause = 1

[State -2, Helper]
type = Helper
trigger1 = numtarget(820)
trigger1 = target(820), stateno = 820
trigger1 = stateno != 800
trigger1 = stateno != 810
trigger1 = stateno != 822
trigger1 = stateno != 823
trigger1 = stateno != 2001
helpertype = normal ;player
stateno = 2009
pos = 0,0
postype = p2
ownpal = 0
ignorehitpause = 1
    

Re: A Few Problems with Character's Script

 October 29, 2016, 04:58:39 PM View in topic context
 Posted by Fighting Toys Freak  in A Few Problems with Character's Script (Started by Fighting Toys Freak October 18, 2016, 07:11:56 PM
 Board: M.U.G.E.N Development Help

Thank you, Odb718. I have already fixed most of the problems for my character through some debugging. However, my character has been experiencing one issue. How could I address the problem in the following code. The following state definition has been persisting the same problem:

Code:
...
[Statedef 2001]
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = target, power != 0
value = 210
elem = 3

[State 0, TargetBind]
type = TargetBind
trigger1 = time = 0
pos = 35, -7

[State 2010, Throw]
type = TargetState
trigger1 = AnimElem = 1
value = 820

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = timemod = 30, 0
value = -20
kill = 0
ignorehitpause = 1

[State 0, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = timemod = 30, 0
value = -20
ignorehitpause = 1

[State 0, LifeAdd]
type = LifeAdd
trigger1 = timemod = 30, 0
value = 20
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = timemod = 30, 0
value = 20
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = target(2001), power = 0
value = 550
ignorehitpause = 1
persistent = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
add = -104,-104,7
mul = 256,256,256
sinadd = 56,56,0,10

...
    

A Few Problems with Character's Script

 October 18, 2016, 07:11:56 PM View in topic context
 Posted by Fighting Toys Freak  in A Few Problems with Character's Script (Started by Fighting Toys Freak October 18, 2016, 07:11:56 PM
 Board: M.U.G.E.N Development Help

Hey.

This thread is intended to address some issues I have with coding my character. I apologize for being quite of a lazy M.U.G.E.N programmer. I have been using some preconceived shortcuts for coding my character; however, my level of coding seems to depict intermediate quality. If there is more information that you would like for me to provide--if you have any suggestions in mind, feel free to do so.

Aside from the fact that my character's script suffers from some coding, nonsensical deficiencies, I have posted revelant portions of several, or a couple, state definitions that have considerable, faulty execution. Some of which are unintended, non-executable state definitions for introduction and win moves, which I will not post because I believe that I can rectify some mistakes through simple debugging. You may view some of them in the following spoilers.

For this problem, I have not been able to execute the move for this set of commands. I suppose that the state definition is logically correct and contenting. Nevertheless, I have posted it in case there is an error that causes its failed execution. The move is supposed to be available in two ways:

Spoiler, click to toggle visibilty
 

Spoiler, click to toggle visibilty
   




Another problem is the target-state-inducing moves. The target is throw into air after the move ends indefinitely. Perhaps, this code in the following is root of the problem:

Spoiler, click to toggle visibilty




When the character changes to another move from the move above, his velocity abnormally is set in a way that both the target and himself disappears (there could be a different error if I am mistaken):

Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty




The independent, target-state-inducing move in the following has completely improper implementation. One of its errors is that the target moves away from the player:

Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty

Another problem is the projectile helpers; they do not appear after they are called. One exception is the kunai move. The 12th variable doubles its size once pressed. The variables prior to the move's execution are not the ones that seem to cause the problem.

Calling helpers
Spoiler, click to toggle visibilty

Projectile helpers
Spoiler, click to toggle visibilty




The last problem I have is that the following move is not angled properly and has an unintended velocity of high speed:

Spoiler, click to toggle visibilty


Your help will be greatly appreciated, and I will appreciate it even more if the query is satisfied. All suggestions are considered.