Предыдущая тема :: Следующая тема |
Автор |
Сообщение |
upp3r newbie \ n00b
Зарегистрирован: 15.09.2005 Сообщения: 16
|
Добавлено: Чт Сен 15, 2005 7:48 pm Заголовок сообщения: Can someone help a little?:) |
|
|
ok, now, i want to make in my q2protr client that it would draw how many bullets, and weapons i have:) (need for drop, which weapon and like that)
this just dwars pics, but not values:
set pic1x 30
set pic1y 30
scrdef s pic11 "xl" $pic1x "yt" $pic1y "picn a_bullets"
cvar_inc pic1y 30
scrdef s pic12 "xl" $pic1x "yt" $pic1y "picn a_shells"
cvar_inc pic1y 30
scrdef s pic13 "xl" $pic1x "yt" $pic1y "picn a_grenades"
cvar_inc pic1y 30
scrdef s pic14 "xl" $pic1x "yt" $pic1y "picn a_rockets"
cvar_inc pic1y 30
scrdef s pic15 "xl" $pic1x "yt" $pic1y "picn a_cells"
cvar_inc pic1y 30
scrdef s pic16 "xl" $pic1x "yt" $pic1y "picn a_slugs"
cvar_inc pic1y 30
please someone help me:)
thanx |
|
Вернуться к началу |
|
|
[MiR]-RPG АЦЦКИЙ ДЕД!!!
Зарегистрирован: 03.11.2003 Сообщения: 2334 Откуда: Yarcity
|
Добавлено: Чт Сен 15, 2005 11:37 pm Заголовок сообщения: |
|
|
try it for example
scrdef s c "ifne $nammo xv 0 yv 40 string [@=$nammo$]"
scrdef s d "num $curweap xr -100 yb -160 string [W=$curweap$]" _________________
Кому пельмешку? =) |
|
Вернуться к началу |
|
|
upp3r newbie \ n00b
Зарегистрирован: 15.09.2005 Сообщения: 16
|
Добавлено: Пт Сен 16, 2005 12:30 am Заголовок сообщения: |
|
|
[MiR]-RPG писал(а): |
try it for example
scrdef s c "ifne $nammo xv 0 yv 40 string [@=$nammo$]"
scrdef s d "num $curweap xr -100 yb -160 string [W=$curweap$]" |
thank you, ill try |
|
Вернуться к началу |
|
|
upp3r newbie \ n00b
Зарегистрирован: 15.09.2005 Сообщения: 16
|
Добавлено: Пт Сен 16, 2005 12:54 am Заголовок сообщения: |
|
|
hmz, is there something like $nbullets or somethin' that would display number of bullets that i poses, when a railgun (any other weapon is drawn,)
maybe it has to do something with entdef?
and is there variable for how many weapons u have? |
|
Вернуться к началу |
|
|
upp3r newbie \ n00b
Зарегистрирован: 15.09.2005 Сообщения: 16
|
Добавлено: Сб Сен 17, 2005 2:23 pm Заголовок сообщения: |
|
|
plz, someone help me! |
|
Вернуться к началу |
|
|
[MiR]Esoptron chain master
Зарегистрирован: 17.10.2003 Сообщения: 92 Откуда: Sydney, Oz
|
Добавлено: Пн Сен 19, 2005 3:21 pm Заголовок сообщения: |
|
|
upp3r,
First thing you do not output anything but icons in your script.
Unfortunately in q2protr ver1 there is no such internal variables that would normally tell you the ammount of your ammo for all weapons you have (and also which weapons you do have). Moreover there are no such variables inside client - these values are kept on server side only.
It is possible, however, to output number of ammo for current weapon as suggested by RPG:
scrdef s c "ifne $nammo xv 0 yv 40 string [@=$nammo$]"
You may want to create your own script that would calculate the ammount for any weapon using the following idea:
On respawn set counters to 0. Create a take trigger that will fire on taking bullets/whatever that will increase an appropriate counter by the ammount of ammo taken (e.g. bulets +50, rockets +5). On any drop command decrease the counter respectively. On switching to that weapon update the counter any time you fire. Clear all counters on death trigger.
The only thing is this would not work for dropped items: if you drop slugs and you have only 1 slug then only 1 slug will be dropped and you get 10 of them by this algorithm :/
In version 2 that I have locally take triggers are much more stable and this approach would give you approximate numbers. |
|
Вернуться к началу |
|
|
upp3r newbie \ n00b
Зарегистрирован: 15.09.2005 Сообщения: 16
|
Добавлено: Пт Сен 23, 2005 6:02 pm Заголовок сообщения: |
|
|
thanks for info, ill try to du that:) |
|
Вернуться к началу |
|
|
upp3r newbie \ n00b
Зарегистрирован: 15.09.2005 Сообщения: 16
|
Добавлено: Сб Сен 24, 2005 1:30 pm Заголовок сообщения: |
|
|
ok, i was doing with the idead of clinet side counting how much you ammo carrie, but then i got an idea, when you shoot -1 ammo right? rocket launcher, rail gun, shotgun, ssg -2 and so on, but what about chaingun? 8 bullets per second, how to count that? - $had_ammo-$nammo$ ?)
and, is thete some counter in q2? or somethin' like that to make?
like if you take yellow armor, and trigger the counter that starts
[Yellow ammo in arena back in - XXs.]
? i use sounds for that, but it isint that efficient:/ |
|
Вернуться к началу |
|
|
|