Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gravity for Baddies (https://forums.graalonline.com/forums/showthread.php?t=12698)

SSRobgeta 09-23-2001 11:30 PM

Gravity for Baddies
 
How can you make the Gravity Script affect Baddies?

Merlin 09-23-2001 11:38 PM

rescript the baddie.

Xaviar 09-23-2001 11:42 PM

Umm..I think he meant the compus, not the scripted baddies, and yes, I can think of one way to do it...

SSRobgeta 09-23-2001 11:58 PM

How?

Xaviar 09-24-2001 12:09 AM

Well...Officialy, its only a vestige (sp?) of an idea...Umm...No..No, it would deffinately work, and it wouldnt be to difficult from the normal grav script...Every baddy has an index, right? Well compus[index].x compus[index].y and compus[index].dir are all you need, stick em with the ifs and the commands inside a for that loops for every baddy...and your done!

Thak2 09-24-2001 12:29 AM

I don't think that would work, because you would have no way of detecting if there is a wall in front of the baddy or not, so he would go right through it.

Making your own baddy would be the only way.

Xaviar 09-24-2001 12:32 AM

Have you never heard of "onwall(x,y)" or even, in the event that he wants only certain tiles as a floor, "board[index]"?

Thak2 09-24-2001 12:34 AM

Can you check the baddys onwall?
I didn't think you could, but I might be wrong.

oscarjf1 09-24-2001 12:35 AM

uhhh
 
not really dude. You could add something like
NPC Code:

if (gravityon && !onwall(compus[index].x,1+compus[index].y) {compus[index].y+=1;
}


;)

Xaviar 09-24-2001 12:37 AM

onwall(compus[index].x+someNumber,compus[index].y+anotherNumber)

Thak2 09-24-2001 12:44 AM

ugh, yes. Hadn't even thought of that. :(

Xaviar 09-24-2001 12:46 AM

No comment :D

CyanideSR71 09-24-2001 01:08 AM

It's been done.

SSRobgeta 09-24-2001 04:59 AM

I would appreciate it if someone would tell me the script :rolleyes:

SSRobgeta 09-24-2001 05:28 AM

Answer? Anyone? Anybody?


All times are GMT +2. The time now is 10:02 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.