Hi guys,
Wondering if I could pick your brains for any suggestions to how overcome the issue I'm having currently.
Basically I have this dragon character where I want to be able to give a item (ID==104 - skull) to and then he shoots a flame/fire (ID==1004) across the screen hitting/killing dizzy. I'm currently using waypoints for the flame which doesn't work, but wondering if because the flame is draw and material is set as "0" then becomes triggered to become draw and material "3". I Also tried using code below:
if(IsUpdate(3))
{
//update the bat only once each 3 frames
idx = ObjFind(1004);
x = ObjGet(idx,O_ X) ;
x+=4; // move from 4 to 4 pixels
if(x>410) x=350;
ObjSet(idx,O_X,x);
With this code, the flame was animated (flying across the screen) but it didn't kill dizzy although flame class is set to "Kill". Here is the current code I'm using:
func UpdateRoom_1_3() ///////////dragon flame
{
idx = ObjFind(1004);// dragon flame
AIUpdateTrain(idx);
ObjPresent(idx);
}
/////////////Dragon
func ActionObject_1003()
{
idx = ObjFind(1003);
if (ObjGet(idx, O_STATUS) == 0)
{
Message2(7,5,"Hello! Who comes there?");
Message1(3,4,"Hello I'm Dizzy");
Message1(4,5,"I'm wondering whynare you preventing Jimnfrom entering hisnlaboratory?"); MessagePop();
Message2(7,5,"Well, I don't like wizards");
Message2(7,5,"These wizards alwaysnuse these places to ncreate anti-dragon devices.");
Message2(7,7,"Like potions and spells"); MessagePop();
Message1(4,5,"Jim isn't like that");
Message2(5,6,"I don't believe you!n Go away!"); MessagePop();
ObjSet(ObjFind(1003),O_STATUS,1);
}
if(ObjGet(ObjFind(1003),O_STATUS)==1)
{
Message2(7,5,"Get away, you wizard!"); MessagePop();
idx = OpenDialogInventory();
if (idx!=-1)
{
UseObject(idx);
}
}
}
func UseObject_1003( idx )
{
if(idx==ObjFind(104))////skull
{
InventorySub(idx);
Message2(5,6,"A skull hahahahah");
Message2(6,7,"You think thatnwould scare me off!");
Message2(7,8,"Hahahahhahahaahah"); MessagePop();
Message2(7,8,"I've killed many humansnin my day"); MessagePop();
Message2(5,6,"So I have no problemnkilling you"); MessagePop();
ObjSet(ObjFind(1004), B_DRAW, 3);
ObjSet(ObjFind(1004), B_MATERIAL, 3);//Kill material
GameCommand(CMD_REFRESH);
}
}
Any suggestions would great and thanks in advance.
Jonesy