Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Вопрос такой: После смерти игрока мне нужно проверить наличие у всех игроков определенной переменной. Я пробовал делать это так. В Death(EDeath eDeath) я поместил следующее // autoreset game if all players are humans/zombies for(int i = 0; i < CEntity::GetMaxPlayers(); i++) { CPlayer* penPlayer = (CPlayer*)CEntity::GetPlayerEntity(i); if (m_bIAmZombie==TRUE) { penPlayer->SendEvent(EGameReset()); CPrintF(TRANS("ZOMBIES WIN")); } else { CPrintF(TRANS("HUMANS WIN")); penPlayer->SendEvent(EGameReset()); } } Тем не менее, игра почему-то вырубилась.
Также такой вопрос: У меня есть определенная энтити, которая совершает действие (вызывает эвент в игроке). Как можно можно ее активировать кодом, с указанием нужного мне события? (она может как активировать эвент, так и изменить переменную в игроке). И еще - как можно ее активировать после 10 секунд после старта игры? Учтите, триггер с автостартом не прокатит, нужно именно кодом. Был бы очень признателен, если поможете.
Сообщение отредактировалHeming_Hitrowski - Суббота, 05.01.2013, 14:10
CEntity::GetMaxPlayers() - тебе нужно вызывать просто GetMaxPlayers(). И проверяй penPlayer перед тем, как обращаешься к нему через указатель; ты итерируешь от 0 до максимального числа игроков, а их может быть меньше максимального, поэтому penPlayer может быть NULL. Второй вопрос не понял. Вызывает ивент? В игроке? Может, она посылает ивент игроку? Активировать - в смысле, отправить EActivate? И как вообще можно "активировать ивент"? Если нужно послать ивент, используй penPointerToSomeEntity->SendEvent(eSomeEventObject). А чтобы что-то сработало через определённое время, можно использовать wait с задержкой:
Код
wait(10.0f) { on (ETimer) : { stop; } otherwise() : { resume; } } SomeFunction(); // Будет вызвана через 10 секунд
Или (ещё проще и правильнее) - autowait:
Код
autowait(10.0f); SomeFunction();
wait и autowait работают только внутри процедур. autowait не работает внутри wait.
Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Ты это в Visual C++ 6.0 компилируешь? А не пытался перед этим открывать проекты СДК в более новой версии? Выглядит так, словно пытался. Так или иначе, компилятор говорит, что у тебя в папке с проектом нет папки Engine, а в ней нет файла Engine.h.
Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Нет, похоже, что ты компилируешь в VC6.0 то, что перед этим было открыто в чём-то другом. Убедись, что Engine\Engine.h существует в правильном месте.
Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Значит, ты не исправил. ) Помести файл (а лучше - всю папку Engine) туда, где её хочет видеть компилятор. Затем, первым делом, откомпилируй (отдельно от всего остального) StdH.cpp.
Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Heming_Hitrowski написал такую статью в последнем номере Serious Time.
Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Пишу садистский пистоль - при выстреле снимается здоровье. Хп отнимается, Сэм кричит, но покраснение экрана вызвать не удаётся. Как быть? Пробовал с DamageImpact из Player.es, но PlayerWeapons.es его не воспринимает.
В методе ReceiveDamage уже есть расчёт "красного экрана", он может не работать из-за отсутствия на уровне WorldSettingController'a и BackgroundViewer'а.
Where did all the dragons go? We searched in the hills and we searched down the canyons, we even scanned the depths of the caves with our armour, swords and lanterns. Oh, if only had we seen him lurch, from his glorious skull covered perch.
CRACK went his claws and SMACK swipped the tail, a ROAR of might, one big BITE.
Не знаю, как написать правильно.…. Как я понял, у каждого врага есть куб и при попадании в него врагу начисляются повреждения.
В правильности терминов и технологии не уверен, но если все примерно так то: Вопрос 1. Как задавать ему размеры. (Например, при анимации «fire» размер куба равен 2*2*2 , а при анимации «walk» 3*3*3)
Вопрос 2. Как можно во время анимации размер куба менять динамически (в начале анимации куб равен 2*2*2, а в конце 3*3*3)
Вопрос 3. Как можно менять положение куба в пространстве. (Например, в начале анимации куб находится под землей, а в конце анимации он вылезает наружу)
Всё очень серьёзно. P.S. Не пишите мне на Email, пишите в Л.С.