You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Editing  \  Bionicle

Back to Threads

Viewing Thread: Bionicle

 

hirmuolio

Joined: 11 November 2008
Posts: 60
01 April 2014 17:08 (UK time)

This will most likely never be finished. Everything started when I wantet to try how meteor 2 scripts work and started to create hau.







Kanohi akaku. I should remove that green stuff and laser.


Yes you can fly!




Hau protects you for a while.


paused


victory


death


This will most likely never be finished. Don't get excited.
It is I, Hirmuolio.


You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
02 April 2014 00:43 (UK time)

hirmuolio wrote:
This will most likely never be finished.
Lol, best marketing ever.
Well, at least release it in whatever state you left it in when you decide to stop working on it. :D


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


You need to login to create posts in this thread.

Archie

Joined: 13 March 2010
Posts: 72
02 April 2014 13:31 (UK time)

This is a flashback. :D Nice job.

Edited: 02 April 2014 13:32


You need to login to create posts in this thread.

me_mantis

Joined: 26 September 2003
Posts: 1152
02 April 2014 18:40 (UK time)

this looks pretty cool! Almost as cool as Meteor 3! (oh snap, should have said that yesterday)

You need to login to create posts in this thread.

Hightree121

Joined: 22 March 2010
Posts: 65
04 April 2014 02:19 (UK time)

Dang, now this is a blast from the past. Looks pretty good.

You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
05 April 2014 19:49 (UK time)

Just some strange stuff I found while working on this:

Objects looks different depending on how it was created.

If I add this flame object in map editor it looks like this (flame is below tahu)


if i add it with scripts it looks like this (tahu is below flame)


The flame is helicopter class with rotating turrents (not working).
You can spawn them on enemies and watch them burn ;)

The script looks like this

void spawntest()
{
int x, y, id;
SC_GetObjectCoords( SC_GetPlayerObjectId(), &x, &y);
id = SC_AddObject("abilities\\firefloor.ob", x, y, -1, AI_ROAMING, 5, "", 0, 0, 0);
SC_SetObjectMaxSpeed( id, 0);

}



And would anyone know how to make spawning flames more accurate on large objects. Object coordinates are from upper left corner of object. This is what happens with my current system.
Small unit is covered with flames but that firetruck is not burning.


char *SC_GetObjectTypeNameForNumber( int ObjectTypeNumber); seems to do something but I have no idea how to use it. (maybe I could do workaround making all large objects have specific speed and changing spawn offset depending on object speed)

It is I, Hirmuolio.


Edited: 05 April 2014 20:03


You need to login to create posts in this thread.

James Bunting
Joined: 17 September 2003
Posts: 1308
07 May 2014 17:12 (UK time)

This looks nice.

Not sure if this helps...

Sub bitmaps and mounts rotate around the centre. You may need to enlarge the image and fill with "magic pink" to get it in the middle.

James

You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
07 May 2014 18:39 (UK time)

Using large mounted objects and small vehicles makes flames hit (^^,). I will somehow have to make script only effect vehicle and not rider but that shouldn't be hard as I can just give all riders instane speed value and ignore everyone with that speed.

I have added summonable fire tornadoes and invisibility with SC_SetObjectNoTarget( SC_GetPlayerObjectId(), 1); (+ some other stuff) (ignore test units scattered around)

But sometimes there is strange bug that stops enemies from attacking me even after invisibility is deactivated. SC_GetObjectNoTarget( SC_GetPlayerObjectId()); returns 0 (normally targeted) but I'm not attacked. Restarting map makes enemies attack me but once invinsibility is activated it is permanent again. After restarting game everything is normal and mask works as intended and I'm attacked when it is not active. Doesn't happen very often.SEE POST BELOW

By the way does anyone know any program that can make/convert .flc video. Google only gives flc->mp4/avi converters, dead links(mostly for dos/98) and converters with watermarks.
It is I, Hirmuolio.


Edited: 10 May 2014 17:42


You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
10 May 2014 18:17 (UK time)

Now this is getting weird.

After scripting abilities and fixing some stuff nothing would attack me after changing mask. Then I noticed that for some strange reason changing mask put me in neutral faction (nothing in my scripts changes factions).

I copied older version of same map and it seemed to work fine. Even when I used my new scripts on old map. These maps are almost identical.

After changing one object on old map (deleted it and placed identical object) old map changes my faction too. Restarted the game and old map works again ~X(.

When either of these codes run my faction always changes on my new map but nothing strange happens on my old map (unless I edit it).
Context for scripts: I have different versions of tahu on the map (flying, x-ray, power etc) each of them set to have no ai, just standing behind a wall and waiting. These scripts change player to one of those and may also change other things (speed, targeting,
invulnerability).

Script that returns player to normal form.

//I was lazy with his one. It disables all powers even if they aren't active.
void palautus() //returns player to normal
{
if ( SC_GetPlayerObjectId() != 1 ) //object with id 1 is normal player object
{


hp = SC_GetObjectHits( SC_GetPlayerObjectId()); //get player hp
angle = SC_GetObjectAngle( SC_GetPlayerObjectId()); //get player angle
SC_GetObjectCoords( SC_GetPlayerObjectId(), &x, &y); //get player coordinates

SC_SetObjectHidden(1, 0); //unhide normal player object
SC_SetPlayerObjectId( 1); //set player object to normal
SC_SetObjectAngle( SC_GetPlayerObjectId(), angle); //same agle as originally
SC_SetObjectCoords( SC_GetPlayerObjectId(), x, y); //set new player ocordinates to original player coordinates
SC_SetObjectHits( SC_GetPlayerObjectId(), hp); //make sure right ammount of hp is given
SC_SetObjectMaxSpeed( SC_GetPlayerObjectId(), SC_GetObjectDefaultMaxSpeed( SC_GetPlayerObjectId())); //normal speed
SC_SetObjectIndestructible(SC_GetPlayerObjectId(),0); //player is no more invulnerable
SC_SetObjectNoTarget( SC_GetPlayerObjectId(), 0); //player is attacked

SC_SetSectorHidden( 2, 0); //hide secrets
SC_SetSectorHidden( 3, 0);


StaticFlags[0] = 1; //set timer

SC_GameMessage("normal");
}

else
{
SC_SetObjectMaxSpeed( SC_GetPlayerObjectId(), SC_GetObjectDefaultMaxSpeed( SC_GetPlayerObjectId())); //normal speed
SC_SetObjectNoTarget( SC_GetPlayerObjectId(), 0); //player targeted
SC_SetSectorHidden( 2, 0); //hide secrets
SC_SetSectorHidden( 3, 0); //hide secrets
StaticFlags[0] = 1; //timer
}
}


Script that gives player specific ability (in this case flying, other masks have almost identical scritp with different id for new player object)

void miru()
{
if ( StaticFlags[0] == 0 && SC_IsPlayerInVehicle() == 0 ) //check if mask is active or player is in vehicle
{

SC_GameMessage("miru");
StaticFlags[0] = -6; //StaticFlags[0] = -6 means that miru is active (if I need to know it somewhere)

SC_GetObjectCoords( SC_GetPlayerObjectId(), &x, &y); //get player coordinates
hp = SC_GetObjectHits( SC_GetPlayerObjectId()); //get player hp
angle = SC_GetObjectAngle( SC_GetPlayerObjectId()); //get player angle

//object id=2 is tahu with flying ability
SC_SetObjectHidden(2, 0); //unhides flying tahu
SC_SetPlayerObjectId( 2); //makes flying tahu new player object
SC_SetObjectCoords( SC_GetPlayerObjectId(), x, y); //moves flying tahu to where player was
SC_SetObjectAngle( SC_GetPlayerObjectId(), angle); //sets same angle
SC_SetObjectHits( SC_GetPlayerObjectId(), hp); //sets same hp
}

else if ( StaticFlags[0] < 0 || StaticFlags[0] > 1) //if mask is active turn player to normal
{
palautus(); //calls powers disabling script
}

}


Good thing that SC_SetObjectSide(SC_GetPlayerObjectId(),1); completely fixes this but it is still very strange.
It is I, Hirmuolio.


Edited: 10 May 2014 18:20


You need to login to create posts in this thread.

Spy

Joined: 05 October 2007
Posts: 1031
15 May 2014 11:19 (UK time)

Looks pretty dank. Keep it up!
I was known as Naval War before.
I love and mod Amnesia: The Dark Descent.
Also an active osu! player: https://osu.ppy.sh/u/3971179


You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
16 May 2014 20:26 (UK time)

Just found this awesome 2d sprite tool called spriter and created this nui-jaga!


Animating six legs and arms wasn't exactly easy even with this program but it looks alot better than the one I made by drawaing each frame by hand :p.
It is I, Hirmuolio.


You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
07 November 2014 18:27 (UK time)

Something wrong with sprites.

I decided to change how hau effect works (and perhaps add some fancy looking effects to some abilities) by adding a sprite below player when hau is activated. Then when kanohi is deactivated this sprite would get destroyed.

Hau activation script contains following lines (rest of the code is not important for this)

StaticFlags[3] = SC_AddSprite( "effects\\shield.spr", x-15, y-15, 0, 0);
//x,y = player coordinates

As you see id of the sprite is stored to StaticFlags[3]

Kanohi deactivation code then contains these lines for hidin the sprite

int c;
c = StaticFlags[3];
SC_GameMessage("c=%d", c); //I want to see id of the sprite for debugging
SC_SetSpriteHidden( StaticFlags[3], 1);

When I run the map everything works. Sprite id 5 is created and then destroyed, sprite id 6 is created and then destroyed. Everything works.

Then I return to map editor and run the map again. Sprite is created but when it should get destroyed I get error (in console) and sprite is not destroyed.

ID_ResolveSpriteId: No such sprite id 5

Every time I run the scripts I get the same message. Stragest part is that StaticFlags[3] is always set to 5 no matter how many sprites I spawn (first one should be 5, second should be 6 etc.).

After restarting meteor 2 everything works again once but breaks down if I try to run the map second time.

I'll see if I can make it work with flat object instead of sprites.

I also found how to swing anemies away from player with scripts B-) (sort of , needs more work).
It is I, Hirmuolio.


You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
07 November 2014 23:46 (UK time)

Sounds like it must be a bug. But I can't really help you out with that right away. It'd help if you sent the parts of the mod in question, so I can screw around with it a bit and maybe figure out a solution.
(parasait dot mpsf at gmail dot com, if you wanna mail it)


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


Edited: 07 November 2014 23:48


You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
08 November 2014 09:21 (UK time)

Use this code on meteor 2 map.

It gives you two buttons. Green button creates a sprite and tells you its id, red button tells id of the sprite you last created and tries to hide it. On first try it will work perfectly but on second try it always says that you created sprite id 0 and then fails to hide it claimin gthat there is no sprite id 0.
It seems that SC_AddSprite gives out wrong sprite id and id of sprites behaves strangely.

void code()
#title "sprite"
#author "Hirmuolio"

#include meteor2


export OnMapStart;
export createsprite;
export hidesprite;


void OnMapStart()
{
SC_CreateToolbar( 4, "testit", 40, 130, 0, 1);
SC_AddToolbarButton( 4, "create sprite", "icons\\Icon_Empty.pcx", "run createsprite", 1);
SC_AddToolbarButton( 4, "hide sprite", "icons\\Icon_Gnv.pcx", "run hidesprite", 1);
}

void createsprite()
{
//create a sprite near player
int x, y;
SC_GetObjectCoords( SC_GetPlayerObjectId(), &x, &y);
StaticFlags[3] = SC_AddSprite( "objects\\ArmouredBunkerCore.spr", x-15, y-15, 0, 0);

//tell us id of the sprite
int SpriteId;
SpriteId = StaticFlags[3];
SC_GameMessage("created SpriteId=%d", SpriteId);
}


void hidesprite()
{
//tell us what sprite we are trying to hide
int SpriteId;
SpriteId = StaticFlags[3];
SC_GameMessage("trying to hide SpriteId=%d", SpriteId);

//hide sprite
SC_SetSpriteHidden( StaticFlags[3], 1);
}

Code on my mod is getting a bit messy (uses 5 .c files for one map).

EDIT:
Additional test reveals new details.
I create new sprites: sprite id 0 is created, sprite id 1 is created ... sprite id 5 is created.
I restart the map. I create new sprite. SC_AddSprite returns 0 as id of the sprite but the id of the sprite is actually 6 as SC_SetSpriteHidden( 6, 1) works. I create new sprite and SC_AddSprite returns 0 as id of the sprite but id of the sprite is actually 7.

It is I, Hirmuolio.


Edited: 08 November 2014 09:46


You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
19 October 2015 15:46 (UK time)

Progress is very slow and I'm lazy.
Today I learned that it is possible to change fonts in Meteor 2.


Just wanted to show it as it looks pretty cool ;).
It is I, Hirmuolio.


You need to login to create posts in this thread.

nyasudah
 Official Sponsor

Joined: 06 February 2005
Posts: 832
19 October 2015 22:24 (UK time)

Ye, I can't read that at all, but sure looks quite unique.
nyasudah / masuda / mp / PetiX / PtX


You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use