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?

SSj_Link 09-24-2001 07:54 AM

Quote:

Originally posted by SSRobgeta
Answer? Anyone? Anybody?
Go Beg Sanstrata lol

SSRobgeta 09-24-2001 06:14 PM

nah

grim_squeaker_x 09-24-2001 06:31 PM

Quote:

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

You can check any single positions onwall state, it isn't really dependant on any players or NPC's X and Y unless you check on the a certain NPC or players X and Y.

Sep3kP2P 09-24-2001 10:52 PM

?
 
wouldn't it be cooler if you had the npc jump? it would make it look cooler... but when to decide to make it jump...

SSRobgeta 09-25-2001 04:53 AM

ok


All times are GMT +2. The time now is 01:20 PM.

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