mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
Tag Animation code block
Thanks to @itsre3
This commit is contained in:
parent
97404c81f2
commit
d5467ba239
1 changed files with 12 additions and 2 deletions
12
dist/ba_root/mods/spazmod/tag.py
vendored
12
dist/ba_root/mods/spazmod/tag.py
vendored
|
|
@ -41,6 +41,7 @@ def addhp(node):
|
||||||
class Tag(object):
|
class Tag(object):
|
||||||
def __init__(self,owner=None,tag="somthing",col=(1,1,1)):
|
def __init__(self,owner=None,tag="somthing",col=(1,1,1)):
|
||||||
self.node=owner
|
self.node=owner
|
||||||
|
sett = setting.get_settings_data()
|
||||||
mnode = ba.newnode('math',
|
mnode = ba.newnode('math',
|
||||||
owner=self.node,
|
owner=self.node,
|
||||||
attrs={
|
attrs={
|
||||||
|
|
@ -79,7 +80,16 @@ class Tag(object):
|
||||||
'h_align': 'center'
|
'h_align': 'center'
|
||||||
})
|
})
|
||||||
mnode.connectattr('output', self.tag_text, 'position')
|
mnode.connectattr('output', self.tag_text, 'position')
|
||||||
|
if sett["enableTagAnimation"]:
|
||||||
|
ba.animate_array(node=self.tag_text, attr='color', size=3, keys={
|
||||||
|
0.2: (2,0,2),
|
||||||
|
0.4: (2,2,0),
|
||||||
|
0.6: (0,2,2),
|
||||||
|
0.8: (2,0,2),
|
||||||
|
1.0: (1,1,0),
|
||||||
|
1.2: (0,1,1),
|
||||||
|
1.4: (1,0,1)
|
||||||
|
}, loop=True)
|
||||||
class Rank(object):
|
class Rank(object):
|
||||||
def __init__(self,owner=None,rank=99):
|
def __init__(self,owner=None,rank=99):
|
||||||
self.node=owner
|
self.node=owner
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue