Users browsing this thread: 20 Guest(s)
[GAME][IN DEVELOMENT] - Project FrostFire
#19
if you all are curious as to what the actual scripts might look like for modifying the game, here's an example.
I'll be sure to release some documentation with the demo for this, but I'll leave it to you to figure it out.

This is the lua file used for setting Nicolas's sprites for his attacks depending on what weapon he has equipped.


Code:
function ScriptInit(id)
    Entity = id
    dir = GetDir(Entity);
    weapon = GetWeaponIndex(Entity);
    animation_index = GetAnimationIndex(Entity);
end

function Nico_Attack_Index_Script
    if(GetFlag(Entity, Flag_isclimbing)==false) and (GetFlag(Entity, Flag_ishanging) == false) and (GetFlag(Entity, Flag_ishurt) == false)
    then
        if (weapon == 0) --case 0
        then
            if (GetFlag(Flag_onground)
            then
                if (animation_index >=4 )
                then
                    SetFlag(Entity, Flag_isattacking, false);
                end
                SetHsp(Entity, 0);
                SetSprite(Entity,spr_slingshot);
            else
                if (animation_index >=3 )
                    then
                        SetFlag(Entity, Flag_isattacking,false);
                    end
                SetSprite(Entity,spr_slingshot_air);
                if (dir==LEFT) then SetHsp(Entity, 3);
                if (dir==RIGHT) then SetHsp(Entity, -3);
            end --break
        elseif (weapon == 1) --case 1
            if (Getflag(Entity, Flag_onground))
                SetHsp(Entity, 0);
                SetSprite(Entity,spr_yoyo_ground);
            else
                SetSprite(Entity,spr_yoyo_air);
            end --break
        end
    end
end
[Image: IGBanner.png]
Thanked by:


Messages In This Thread
RE: Project FrostFire DevLog - by Sengir - 01-25-2010, 10:26 AM
RE: Project FrostFire DevLog - by Codestar - 01-25-2010, 10:35 AM
RE: Project FrostFire DevLog - by Vipershark - 01-25-2010, 12:23 PM
RE: Project FrostFire DevLog - by Codestar - 01-25-2010, 01:55 PM
RE: Project FrostFire DevLog - by Vipershark - 01-25-2010, 11:26 PM
RE: Project FrostFire DevLog - by Maxpphire - 01-26-2010, 09:26 AM
RE: Project FrostFire DevLog - by Vipershark - 01-26-2010, 10:42 AM
RE: Project FrostFire DevLog - by Goemar - 01-26-2010, 09:55 AM
RE: Project FrostFire DevLog - by Codestar - 01-26-2010, 12:07 PM
RE: Project FrostFire DevLog - by Maxpphire - 01-26-2010, 12:56 PM
RE: Project FrostFire DevLog - by Codestar - 01-26-2010, 02:55 PM
RE: Project FrostFire DevLog - by Vipershark - 01-26-2010, 03:30 PM
RE: Project FrostFire DevLog - by Codestar - 01-27-2010, 01:51 PM
RE: Project FrostFire DevLog - by Codestar - 01-29-2010, 08:51 AM
RE: Project FrostFire DevLog - by CeeY - 02-02-2010, 12:00 PM
RE: Project FrostFire DevLog - by Gold - 01-29-2010, 09:59 AM
RE: Project FrostFire DevLog - by Codestar - 01-29-2010, 10:18 AM
RE: Project FrostFire DevLog - by Codestar - 01-31-2010, 06:06 PM
RE: Project FrostFire DevLog - by Codestar - 02-02-2010, 12:04 PM
RE: Project FrostFire DevLog - by Goemar - 02-02-2010, 12:22 PM
RE: Project FrostFire DevLog - by Codestar - 02-02-2010, 01:29 PM
RE: Project FrostFire DevLog - by Solink - 02-02-2010, 05:18 PM
RE: Project FrostFire DevLog - by Codestar - 02-08-2010, 03:30 PM
RE: Project FrostFire DevLog - by DanKen - 02-08-2010, 05:01 PM
RE: Project FrostFire DevLog - by Codestar - 02-08-2010, 05:05 PM
RE: Project FrostFire DevLog - by Mabelma - 02-08-2010, 05:06 PM
RE: Project FrostFire DevLog - by Codestar - 02-08-2010, 05:10 PM
RE: Project FrostFire DevLog - by Mabelma - 02-08-2010, 05:19 PM
RE: Project FrostFire DevLog - by SpartanFever - 02-08-2010, 08:32 PM
RE: Project FrostFire DevLog - by Codestar - 02-19-2010, 09:29 AM
RE: Project FrostFire DevLog - by Codestar - 02-22-2010, 03:37 PM
RE: Project FrostFire DevLog - by Codestar - 03-15-2010, 01:29 PM
RE: Project FrostFire DevLog - by Codestar - 03-25-2010, 10:47 AM
RE: Project FrostFire DevLog - by Sengir - 03-25-2010, 11:11 AM
RE: Project FrostFire DevLog - by Codestar - 03-25-2010, 11:14 AM
RE: Project FrostFire DevLog - by Lemon - 03-25-2010, 11:41 AM
RE: Project FrostFire DevLog - by Codestar - 03-29-2010, 08:59 AM
RE: Project FrostFire DevLog - by Codestar - 03-29-2010, 02:43 PM
RE: Project FrostFire DevLog - by Gold - 03-29-2010, 02:44 PM
RE: Project FrostFire DevLog - by Codestar - 04-01-2010, 10:40 AM
RE: Project FrostFire DevLog - by Mabelma - 04-01-2010, 10:52 AM
RE: Project FrostFire DevLog - by Codestar - 04-05-2010, 08:54 AM
RE: Project FrostFire DevLog - by Codestar - 04-08-2010, 01:33 PM
RE: Project FrostFire DevLog - by Codestar - 04-09-2010, 11:09 AM
RE: Project FrostFire DevLog - by Codestar - 04-22-2010, 02:39 PM
RE: Project FrostFire DevLog - by Vipershark - 04-22-2010, 03:45 PM
RE: Project FrostFire DevLog - by Codestar - 04-26-2010, 08:21 PM
RE: Project FrostFire DevLog - by Britt - 04-26-2010, 08:44 PM
RE: Project FrostFire DevLog - by Lemon - 04-27-2010, 12:58 AM
RE: Project FrostFire DevLog - by Codestar - 04-27-2010, 09:49 AM
RE: Project FrostFire DevLog - by Codestar - 05-07-2010, 10:29 AM
RE: Project FrostFire DevLog - by Codestar - 05-10-2010, 10:32 AM
RE: Project FrostFire DevLog - by Alpha Six - 05-10-2010, 03:16 PM
RE: Project FrostFire DevLog - by Codestar - 05-11-2010, 08:38 AM
RE: Project FrostFire DevLog - by Lexou Duck - 05-11-2010, 09:04 AM
RE: Project FrostFire DevLog - by Codestar - 05-11-2010, 09:37 AM
RE: Project FrostFire DevLog - by Codestar - 05-14-2010, 07:37 AM
RE: Project FrostFire DevLog - by Codestar - 05-14-2010, 01:26 PM
RE: Project FrostFire DevLog - by Alpha Six - 05-14-2010, 02:57 PM
RE: Project FrostFire DevLog - by Codestar - 05-14-2010, 04:35 PM
RE: Project FrostFire DevLog - by Tea - 05-16-2010, 05:03 AM
RE: Project FrostFire DevLog - by Vipershark - 05-15-2010, 07:32 PM
RE: Project FrostFire DevLog - by Codestar - 05-26-2010, 08:48 PM
RE: Project FrostFire DevLog - by Lexou Duck - 05-27-2010, 12:19 AM
RE: Project FrostFire DevLog - by Codestar - 07-13-2010, 07:18 PM
RE: Project FrostFire DevLog - by Codestar - 07-17-2010, 07:42 PM
RE: Project FrostFire DevLog - by Kairos - 07-17-2010, 07:52 PM
RE: Project FrostFire DevLog - by Codestar - 07-20-2010, 01:52 PM
RE: Project FrostFire DevLog - by Mabelma - 07-20-2010, 01:55 PM
RE: Project FrostFire DevLog - by Sengir - 07-20-2010, 01:57 PM
RE: Project FrostFire DevLog - by Previous - 07-20-2010, 03:00 PM
RE: Project FrostFire DevLog - by Gors - 07-21-2010, 02:09 PM
RE: Project FrostFire DevLog - by Vipershark - 07-21-2010, 02:16 PM
RE: Project FrostFire DevLog - by Rhyme - 07-21-2010, 10:22 PM
RE: Project FrostFire DevLog - by Codestar - 07-21-2010, 10:26 PM
RE: Project FrostFire DevLog - by Codestar - 07-29-2010, 01:19 AM
RE: Project FrostFire DevLog - by Previous - 07-29-2010, 02:44 AM
RE: Project FrostFire DevLog - by Vipershark - 07-29-2010, 05:06 PM
RE: Project FrostFire DevLog - by Codestar - 07-29-2010, 06:03 PM
RE: Project FrostFire DevLog - by Previous - 07-30-2010, 09:13 AM
RE: Project FrostFire DevLog - by Codestar - 08-01-2010, 08:41 PM
RE: Project FrostFire DevLog - by Codestar - 08-22-2010, 09:33 PM

Forum Jump: