gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
416913 Posts in 29726 Topics by 34423 Members - Latest Member: ojesenia32 September 03, 2010, 01:47:28 AM
*
gfx* Home Help Login Register gfx
gfx
Mugen-Infantry  |  M.U.G.E.N. Support  |  M.U.G.E.N Guidance  |  Code Tavern (Moderator: iTorres)  |  Offscreen Player Icon
gfx
gfxgfx
 

Author Topic: Offscreen Player Icon  (Read 246 times)

0 Members and 1 Guest are viewing this topic.

Offline Seraphs Ares

  • M.U.G.E.N Contributor
  • *****
  • Posts: 83
  • Honor: 6
  • Gender: Male
  • Creator of the first (edit) BlazBlue character.
    • View Profile
    • VGTribune
Offscreen Player Icon
« on: November 04, 2009, 02:00:36 PM »
Hello all, it has been a while since I posted.

Here's a code for those characters that don't have some kind of indicator when they are offscreen. This coding that I am about to show you will show where the character is at when they are off screen (X-axis relation). This code originally came from Amachi's Sol Badguy, though I modified it and added the icon when the character goes above the screen, which Amachi did not add. So I wanted to share this to you all.

Before we start:
+Make sure you have any states open. You can use any number, but I will use Statedef 7000 for the example.
+Have at least have a var(any number) open (as in not used). I will use var(2) for the example.

The First Step:

+First off, set the var(number) to 1 (below), and 2 (above) when the character goes off the screen position.
+Make sure you type this code in the Statedef -2 area.

Code: [Select]
[State VarS, 1]
type = VarSet
trigger1 = ScreenPos Y < 0
v = 31
value = 2

[State VarS, 1]
type = VarSet
trigger1 = ScreenPos Y > 352
v = 31
value = 1

[State VarS, 1]
type = VarSet
trigger1 = ScreenPos Y = [0,352]
v = 31
value = 0

The Second Step:

+Now, copy and paste this anywhere besides the Statedef -2 and -3.
+Remember, you can edit the -218/-100 numbers (which has the comment on it) your position the icon anywhere you like.

Code: [Select]
[Statedef 7000]
type = A
movetype = I
physics = N

[State PosS, 1];-----------Icon for Below offscreen
type = PosSet
triggerall = root,var(31) = 1
trigger1 = 1
facing = 1
x = root,Pos X
y = (Pos Y)-(-218+ScreenPos Y) ;---------------Edit '-218' to your liking

[State PosS, 1];-----------Icon for Above offscreen
type = PosSet
triggerall = root,var(31) = 2
trigger1 = 1
facing = 1
x = root,Pos X
y = (Pos Y)-(-100+ScreenPos Y) ;---------------Edit '-100' to your liking

[State ChangeA, 1]
type = ChangeAnim
trigger1 = 1
value = root,anim
elem  = root,animelemno(0)
ignorehitpause = 1
persistent = 1
supermovetime = -1
pausemovetime = -1

[State Turn, 1]
type = Turn
trigger1 = facing != root,facing

[State NotHit, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State Assert, 1]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State DestroyS, 1];-----------Gets destroyed when character becomes visible
type = DestroySelf
trigger1 = root,var(31) = 0

The Third Step:
+Copy paste this to the Statedef -2 area of your character. (Preferably above where you set the var(number) for the offscreen)

Code: [Select]
[State Help, 1]
type = Helper
trigger1 = numhelper(7000) = 0
trigger1 = var(31) > 0
helpertype = normal
name = "Player_Icon"
ID = 7000
stateno = 7000
keyctrl = 0
removetime = -1
bindtime = -1
ontop = 1
size.xscale = .25
size.yscale = .25
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

+Then your done!




Original Source: Amachi's Sol Badguy
+Credits goes to Amachi for having the idea and coding.



New Version: Ares' Ares (Modded Ky-in Kiske-ragi)
+Also, you get a peek of the Ky Kiske I am stirring up... (..It's something that man should not ever made for MUGEN!!!)



Happy Coding!

~Ares
« Last Edit: November 04, 2009, 02:03:38 PM by Seraphs Ares »
I have returned, but partially.

The Blue Screen of Death only delayed me for a short time. I'm resuming work with Ares and will update the page when the time comes.

Mugen-Infantry  |  M.U.G.E.N. Support  |  M.U.G.E.N Guidance  |  Code Tavern (Moderator: iTorres)  |  Offscreen Player Icon
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!