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.

**
supercain is Offline
Contact supercain:

supercain

User

Messages by supercain

    

Re: Reset camera to 0 (original position)

 October 04, 2020, 06:37:48 pm View in topic context
avatar  Posted by supercain  in Reset camera to 0 (original position) (Started by supercain September 30, 2020, 09:00:35 pm
 Board: M.U.G.E.N Development Help

#1is no mess. This is necessary because that will add the right amount of pixels to move the helper in order to have the camera back at 0.

It pretty much says: if camerapos x is -180 then move the helper 404 pixels to the right (or left depending on facing), else if camerapos x is 40 then add 270 pixels and so on. This makes the camera go back to camerapos x = 0.

#2 this method actually works you only need to run a few tests in order to get the sample values. In this case 40 pixels for a camerapos x = -180 and 270 pixels for 40.

beterhans, as I said. I want to move the camera back to its original position in the X axis. I need it like this because the stage is made in a way that it would look weird when certain states are triggered.
    

Re: Reset camera to 0 (original position)

 October 04, 2020, 01:31:07 am View in topic context
avatar  Posted by supercain  in Reset camera to 0 (original position) (Started by supercain September 30, 2020, 09:00:35 pm
 Board: M.U.G.E.N Development Help

Thanks. I just need to reset the camera back to 0 because otherwise the stage will look weird for a certain custom state.

This is what I did and kinda worked but its hard to get the exact value:

Code:
[State 4420.2, center camera]
type = posadd
triggerall = time > 0
trigger1 = pos x != ifelse(root,var(32) < 0,(1.01509*abs(root,var(32)))+233,-(1.01509*abs(root,var(32)))-233)
x = ifelse(root,var(32) < 0 && facing > 0,1,ifelse(root,var(32) < 0 && facing < 0,-1,ifelse(root,var(32) > 0 && facing > 0,-1,1)))

where var(32) equals camerapos x (I only need to adjust the X axis).
    

Re: ifelse with 3 or more conditionals?

 October 02, 2020, 01:46:29 am View in topic context
avatar  Posted by supercain  in ifelse with 3 or more conditionals? (Started by supercain September 29, 2020, 10:42:24 pm
 Board: M.U.G.E.N Development Help

Hmm, so for example:

Code:
[state n]
type = changestate
trigger1 = var(1) := 1
value = 30

means that the player will change to state no. 30 when variable equals 1?

    

Reset camera to 0 (original position)

 September 30, 2020, 09:00:35 pm View in topic context
avatar  Posted by supercain  in Reset camera to 0 (original position) (Started by supercain September 30, 2020, 09:00:35 pm
 Board: M.U.G.E.N Development Help

Hi,

Is it possible to reset the camera back to its original position? I tried many things but dont quite work. This is an approach:

Code:
[State 90, d1]
type = width
trigger1 = camerapos x < 0
edge = 0,440

it does nothing I dont understand why.

Thank you.
    

Re: ifelse with 3 or more conditionals?

 September 30, 2020, 08:58:22 pm View in topic context
avatar  Posted by supercain  in ifelse with 3 or more conditionals? (Started by supercain September 29, 2020, 10:42:24 pm
 Board: M.U.G.E.N Development Help

Im intrigued, what does the
Code:
:=

mean?
    

Re: ifelse with 3 or more conditionals?

 September 30, 2020, 01:45:13 am View in topic context
avatar  Posted by supercain  in ifelse with 3 or more conditionals? (Started by supercain September 29, 2020, 10:42:24 pm
 Board: M.U.G.E.N Development Help

Thanks. I had tried that in the past but Im not sure if it works as desired. Does it?
    

ifelse with 3 or more conditionals?

 September 29, 2020, 10:42:24 pm View in topic context
avatar  Posted by supercain  in ifelse with 3 or more conditionals? (Started by supercain September 29, 2020, 10:42:24 pm
 Board: M.U.G.E.N Development Help

Hi,

In programming you usually have an option to establish different results for each given conditions but what about mugen? Ifelse only allows 2. Is there a way out there to have 3 or more conditionals? I need something like this for a trigger:

Code:
if partner,stateno = stateno -> SET THIS TRIGGER
if enemy(0),stateno = stateno -> SET THIS OTHER TRIGGER
if enemy(1),stateno = stateno -> THEN SET THIS ONE

How can  I set a trigger like this?

Thank you.
    

Re: I just dont get envshake

 September 29, 2020, 07:07:36 pm View in topic context
avatar  Posted by supercain  in I just dont get envshake (Started by supercain July 31, 2020, 12:15:21 am
 Board: M.U.G.E.N Development Help

Thank you for your kind explanation. I had missed this reply.
    

Re: How to detect the distance from another helper?

 August 30, 2020, 06:49:26 pm View in topic context
avatar  Posted by supercain  in How to detect the distance from another helper? (Started by supercain August 30, 2020, 07:38:52 am
 Board: M.U.G.E.N Development Help

    

How to detect the distance from another helper?

 August 30, 2020, 07:38:52 am View in topic context
avatar  Posted by supercain  in How to detect the distance from another helper? (Started by supercain August 30, 2020, 07:38:52 am
 Board: M.U.G.E.N Development Help

Hi,

Im coding a state for a helper and one action triggers only if its at certain distance from another helper from the same root. How do I do that?

Code:
[State 0, stop] 
type = velset
trigger1 = helper(1000),rootdist x = 430
x = 0

Thank you.
    

Re: Preventing the AI from doing stupid things

 August 28, 2020, 07:10:19 am View in topic context
avatar  Posted by supercain  in Preventing the AI from doing stupid things (Started by supercain August 24, 2020, 06:17:14 pm
 Board: M.U.G.E.N Development Help

Hmm, thats kinda odd. In my game there is controls for state -2 in the common1.cns file. Thats where I coded the deadly stage.
    

Re: Preventing the AI from doing stupid things

 August 27, 2020, 09:30:14 pm View in topic context
avatar  Posted by supercain  in Preventing the AI from doing stupid things (Started by supercain August 24, 2020, 06:17:14 pm
 Board: M.U.G.E.N Development Help

Yes, they all have it. What about coding it in state -2?
    

Re: Preventing the AI from doing stupid things

 August 27, 2020, 08:16:02 pm View in topic context
avatar  Posted by supercain  in Preventing the AI from doing stupid things (Started by supercain August 24, 2020, 06:17:14 pm
 Board: M.U.G.E.N Development Help

I have to code it for each character one by one? Cant I do it on the common.cns file?
    

Preventing the AI from doing stupid things

 August 24, 2020, 06:17:14 pm View in topic context
avatar  Posted by supercain  in Preventing the AI from doing stupid things (Started by supercain August 24, 2020, 06:17:14 pm
 Board: M.U.G.E.N Development Help

Hi,

I made a stage whose far right edge is deadly to the touch so if you ever walk it it results in instant death. However CPU controlled players dont seem to understand that and they keep on walking this area. As much as it is very fun to see the CPU killing itself thats not what I want so I wonder how can I prevent the AI from committing suicide like that.

The code for the deadly spot is this

Code:
[State 0, die] 
type = changestate
triggerall = stagevar(info.name) = "deadlystage"
triggerall = ifelse(TeamSide = 1,helper(6969),rootdist x < -432,helper(6969),rootdist x > 432)
trigger1 = pos y = 0
value = 4319

Thank you.
    

I just dont get envshake

 July 31, 2020, 12:15:21 am View in topic context
avatar  Posted by supercain  in I just dont get envshake (Started by supercain July 31, 2020, 12:15:21 am
 Board: M.U.G.E.N Development Help

Hi,

I read the documentation over and over but I cant understand how envshake works. All I am trying to do is to make the ground go up by one screen but slowly so the floor goes off the top edge of the screen. I wrote this:

Code:
type = envshake
trigger1 = 1
ampl = 900*time
freq = 100
time = 9999
phase = 0.1

the first 50 pixels or so go up at once and after that it starts going up gradually so it looks pretty choppy. How can I adjust the values so it goes smoothly all the way up?

Thank you.
    

Re: change background gradually?

 July 13, 2020, 07:03:55 pm View in topic context
avatar  Posted by supercain  in change background gradually? (Started by supercain June 29, 2020, 08:23:50 am
 Board: M.U.G.E.N Development Help

I think I got it. Thank you everyone.
    

Re: change background gradually?

 July 13, 2020, 05:55:07 am View in topic context
avatar  Posted by supercain  in change background gradually? (Started by supercain June 29, 2020, 08:23:50 am
 Board: M.U.G.E.N Development Help

So this code:

stateno = 3000 && gametime = 76

doesnt mean 76 ticks after state no. 3000 began but after the match started??
    

Re: Remove orphaned explods

 July 12, 2020, 11:11:24 pm View in topic context
avatar  Posted by supercain  in Remove orphaned explods (Started by supercain July 11, 2020, 09:32:05 pm
 Board: M.U.G.E.N Development Help

Hmm, I see. If thats the only way around I think I will have to stick to it.

Thank you.
    

Re: Remove orphaned explods

 July 12, 2020, 08:30:14 pm View in topic context
avatar  Posted by supercain  in Remove orphaned explods (Started by supercain July 11, 2020, 09:32:05 pm
 Board: M.U.G.E.N Development Help

There is actually too many helpers that leave orphaned explods which I need to remove at a given time so I cant just go and modify each of those helpers because it would be overwhelming.  Thats why I need something that can just remove the orphaned explods regardless of the helper. I use mugen 1.1 by the way.
    

Re: Remove orphaned explods

 July 12, 2020, 06:06:48 pm View in topic context
avatar  Posted by supercain  in Remove orphaned explods (Started by supercain July 11, 2020, 09:32:05 pm
 Board: M.U.G.E.N Development Help

The helper is already destroyed.  I need to destroy its explods after that.