Записи участника (SirNikolas) - Форум


Правила форума ·

  • Страница 2 из 4
  • «
  • 1
  • 2
  • 3
  • 4
  • »
Форум » Записи участника » SirNikolas [55]
Результаты поиска

SirNikolas

#16 | Тема: Наработки для гуишников
Разные функции с одинаковыми именами. На cJASS реализуется следующим образом:
Code
define {
     abc(x, y, z) = abc_proto1(x, y, z)
     abc(x, y) = abc_proto2(x, y)//Или abc_proto1(x, y, 0)
     abc(x) = abc_proto3(x)//abc_proto1(x, 0, 0)
     abc() = abc_proto4()//abc_proto1(0, 0, 0)
}
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#17 | Тема: Наработки для гуишников
Quote (Ty3uK)
1) Движение дамми на определенное расстояние:
Code
call MoveDummy(юнит, расстояние, скорость, удалять ли дамми в конце)
2) Движение дамми в точку каста:
Code
call MoveDummy(юнит, скорость, удалять ли дамми в конце)
3) Прыжок на определенное расстояние:
Code
call MoveDummy(юнит, расстояние)
4) Прыжок в точку каста:
Code
call MoveDummy(юнит)
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#19 | Тема: jass
[jass]function abc takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer i = 0
loop
call KillUnit(u)
exitwhen i == 10
set i = i + 1
endloop
set u = null
endfunction[/jass]

Добавлено (28.12.11, 14:21)
---------------------------------------------
Базу нативок и BJ еще надо.

Добавлено (28.12.11, 14:23)
---------------------------------------------
[jass]library struct method interface module private public debug static for while
include define enum do lambda[/jass]

Добавлено (28.12.11, 14:29)
---------------------------------------------

Добавлено (28.12.11, 14:30)
---------------------------------------------
ZINC и cJASS в игноре?

Добавлено (28.12.11, 14:38)
---------------------------------------------
[jass]void bool int float array[/jass]

Добавлено (28.12.11, 14:55)
---------------------------------------------
[jass]local integer i = 123
local real r = 1.23
set i = 0123
set i = 0x123
set i = $123
set r = .123
set r = 123.[/jass]

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#20 | Тема: jass
[jass]true false this null DEBUG FUNCNAME COUNTER
code handle agent widget eventid[/jass]

Добавлено (28.12.11, 15:02)
---------------------------------------------

Quote (CoRVu$)
тест текста. чё будет?
Code
Syntax error (line 1): Illegal char 'т'

Добавлено (28.12.11, 15:03)
---------------------------------------------
[jass]bj_mapInitialPlayableArea[/jass]

Добавлено (28.12.11, 15:05)
---------------------------------------------

Quote (SirNikolas)
DEBUG
Это не ключевое слово, а константа.

Добавлено (28.12.11, 15:07)
---------------------------------------------
[jass]local integer id = 'A000'
local integer id2 = 'x'[/jass]

Добавлено (28.12.11, 15:08)
---------------------------------------------
[jass]INTEGER REAL BOOLEAN FUNCTION[/jass]

Добавлено (28.12.11, 15:09)
---------------------------------------------
^ Нечувствителен к регистру.

Добавлено (28.12.11, 15:39)
---------------------------------------------
[jass]local unit u = GetTriggerUnit()[/jass]

Добавлено (28.12.11, 15:40)
---------------------------------------------
^ Внутри тега работают BB-коды.

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#21 | Тема: jass
[jass]function DoNothingBJ takes nothing returns nothing
call CommentString("Проверка подсветки BJ и строк")
//А также комментариев
call DoNothing()
endfunction[/jass]

Добавлено (29.12.11, 09:43)
---------------------------------------------
[jass]#if WAR3VER == WAR3VER_23
#error "Wrong version"
#elseif WAR3VER == WAR3VER_24
//Все нормально
#endif[/jass]

Добавлено (29.12.11, 09:47)
---------------------------------------------
[jass]/*
* MyLibrary vX.XX
*
* Description of my library.
*
* © Year Author \\ Ternox.com
*
*/[/jass]

Добавлено (29.12.11, 09:51)
---------------------------------------------
[jass]call IssueImmediateOrderById(GetTriggerUnit(), 851972 /*stop*/)[/jass]

Добавлено (29.12.11, 11:21)
---------------------------------------------
[jass]function TestSpaces takes nothing returns nothing
if true then
call DoNothing()
endif
loop
call DoNothing()
exitwhen true
endloop
endfunction[/jass]

Добавлено (29.12.11, 11:24)
---------------------------------------------
[jass]FALSE TRUE JASS_MAX_ARRAY_SIZE bj_MISSION_INDEX_T01 bj_lastCreatedUnit bj_mapInitialPlayableArea[/jass]

Добавлено (29.12.11, 11:59)
---------------------------------------------
[jass]void MyFunc(void) {
unit u = GetTriggerUnit(), \
u2 = GetSpellTargetUnit()
if true { DoNothing() }
KillUnit(u); KillUnit(u2)
u = null; u2 = null
}[/jass]

Добавлено (29.12.11, 12:53)
---------------------------------------------
[jass]key thistype[/jass]

Добавлено (29.12.11, 12:55)
---------------------------------------------
[jass]thistype.abc = 0
this.def = 1
abc.thistype
def.this[/jass]

Добавлено (29.12.11, 12:56)
---------------------------------------------
[jass]define GetHandleIdBJ(h) = GetHandle##IdBJ(h)[/jass]

Добавлено (29.12.11, 13:13)
---------------------------------------------
[jass]struct MyStruct extends array
private static method onInit takes nothing returns nothing
call DoNothing()
endmethod
endstruct[/jass]

Добавлено (29.12.11, 13:19)
---------------------------------------------
[jass]//! zinc
library Test {
function onInit() {
boolean b = true;
integer i;
for (0 <= i < 16)
BJDebugMsg(I2S(i));
if (b && true || false)
DoNothing();
}
}
//! endzinc[/jass]

Добавлено (29.12.11, 13:50)
---------------------------------------------
[jass] native GetPlayerUnitTypeCount takes player p, integer unitid returns integer
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native GetUnitBuildTime takes integer unitid returns integer
native IsTowered takes unit target returns boolean
native CreepsOnMap takes nothing returns boolean
native UnitAlive takes unit id returns boolean[/jass]

Добавлено (29.12.11, 14:14)
---------------------------------------------
[jass]function test takes nothing returns nothing
call DoNothing()
endfunction[/jass]

Добавлено (29.12.11, 14:16)
---------------------------------------------
[jass]function test2 takes nothing returns nothing
call DoNothing()
endfunction[/jass]

Добавлено (29.12.11, 14:17)
---------------------------------------------
[jass]function test2 takes nothing returns nothing
call DoNothing()
endfunction[/jass]

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#22 | Тема: jass
Quote (Spirit_of_Dragon)
и имена функций и методов непривычно подсвечиваются т_т
Только onInit и onDestroy. Я подумал, удобнее будет.[jass]native GetPlayerUnitTypeCount takes player p, integer unitid returns integer
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native GetUnitBuildTime takes integer unitid returns integer
native IsTowered takes unit target returns boolean
native CreepsOnMap takes nothing returns boolean
native UnitAlive takes unit id returns boolean[/jass]Ty3uK, добавь уже эти нативки. smile
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#23 | Тема: jass
Кстати, надо сделать, чтоб так же подсвечивались create, destroy, allocate и deallocate.
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#24 | Тема: Dictionary
Во-первых, потому что в C# данный класс называется "Dictionary", а не "Словарь". Во-вторых, потому что в JASS запрещено использовать в названиях кириллицу. В-третьих, потому что образованные программисты знают английский. В-четвертых, потому что я собираюсь выложить его на Хайв. В-пятых, потому что так принято. В-шестых, потому что, возможно, ты не прочитал первый пост, а если и прочитал, то не понял.

Еще вопросы?
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#25 | Тема: jass
[jass]onInit onDestroy create destroy allocate deallocate evaluate execute super name SCOPE_PREFIX SCOPE_PRIVATE[/jass]

Добавлено (05.01.12, 08:15)
---------------------------------------------
[jass]//! zinc
library TestSpacesAgain {
function onInit() {
integer i;
if (false)
DoNothing();
else if true
DoNothing();
else {
DoNothing();
DoNothing();
}
for (0 <= i < 16)
DoNothing();
while (i >= 0) {
DoNothing();
i = i - 1;
}
}
}
//! endzinc[/jass]

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#26 | Тема: jass
[jass] //! zinc
library TestOfUsingTab {
function onInit() {
BJDebugMsg("OMG!!!");
}
}

library TestOfUsingSpaces {
function onInit() {
BJDebugMsg("OMG в квадрате");
}
}
//! endzinc[/jass]

Добавлено (07.01.12, 11:35)
---------------------------------------------
[jass]function GetS takes nothing returns string
return "VeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongString"
endfunction

function IsPointInTriangle takes real x1, real y1, real x2, real y2, real x3, real y3, real x, real y returns boolean
local boolean b = ((x2 - x) * (y3 - y2)) - ((x3 - x2) * (y2 - y)) >= 0
return (((x1 - x) * (y2 - y1)) - ((x2 - x1) * (y1 - y)) >= 0) == b and b == (((x3 - x) * (y1 - y3)) - ((x1 - x3) * (y3 - y)) >= 0)
endfunction[/jass]

Добавлено (07.01.12, 11:37)
---------------------------------------------
[jass]function TestNewLinesInStrings takes nothing returns nothing
return "
1234567890
----------

qwertyuiop
"
endfunction[/jass]

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#27 | Тема: [ОПРОС] Иконка для Берсерка
3. К карте с доминирующим дизайном Фкоффа лучше всего подойдет именно его работа (Кэп).
Можно было бы поставить первую, если бы она не была так ужасно перекрашена.
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#28 | Тема: Преобразование урона в золото
Quote (MEGA)
[jass]call SetTextTagSuspendedBJ( GetLastCreatedTextTag(), false )[/jass]
Лишнее действие.

Вместо кучи проверок на игрока лучше создать строковый массив, забить его значениями типа { "|cffff0000", "|cff0000ff", ... } и устанавливать текст на Color[(Player number of (Owner of (Damage source)))] + String(Integer((Damage taken))).
Quote (MEGA)
баггов не обнаружено.
Баг обнаружен. Если воин применит дамажащее заклинание на юнита, которого никто никогда не атаковал, золота не будет (тексттага, естественно, тоже).
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#29 | Тема: Преобразование урона в золото
Quote (MEGA)
надо чё-нить придумать.
А чего придумывать? Все уже давно придумано. При входе юнита в область игровой карты добавляем ему событие получения урона. Плюс надо добавить для всех изначально находящихся на карте.
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#30 | Тема: Часто задаваемые вопросы
Это карта для мультиплеера? Если нет, я могу легко сделать Save-Load. Если да, придется постараться, но тоже реально.
Quote (CoRVu$)
Требуется JNPG!
JASS NewGen Pack, JNGP. Пишите правильно.
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.
Форум » Записи участника » SirNikolas [55]
  • Страница 2 из 4
  • «
  • 1
  • 2
  • 3
  • 4
  • »
Поиск: