Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-15-2003, 09:40 PM
PrinceDark PrinceDark is offline
Criminal X
PrinceDark's Avatar
Join Date: Feb 2003
Location: Miami, Florida
Posts: 662
PrinceDark will become famous soon enough
Question Bomb Movement

Ok I tried this offline.
NPC Code:

if(playerenters||timeout){
for(i=0;i<bombscount;i++{
bombs[i].y+=.4;
}
timeout=.1;
}



It didn't work for me. I was attempting to make a quest where if the player lays a bomb it would begin moving in a certain direction, and I did that above script to test to see if it was possible to actually do this. It didn't work for me. So I then went into the newfeatures2001.txt and it said all those types of variables for bombs[], arrows[], npcs[], etc were all read-only.

Is there any other possible methods of moving a bomb placed by the player or am I missing something that I should add on to this script?
__________________
- Criminal X: certified nut case
Reply With Quote
  #2  
Old 02-15-2003, 09:57 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
You're going to want to make your own bomb NPC for this one.
Using a bomb image as the bomb, and have it scripted to blow up like a bomb after a certain amount of time. To get what you want, you're going to also have to add some script that would get it to move in a certain direction after laid (I would suggest using "move"). Etc.

Pretty easy, actually.
Reply With Quote
  #3  
Old 02-16-2003, 06:11 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
You could remove the bomb and move it with showimg to where you want, then place the bomb there when its at the destination?
__________________

subliminal message: 1+1=3
Reply With Quote
  #4  
Old 02-16-2003, 06:44 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by Falcor
You could remove the bomb and move it with showimg to where you want, then place the bomb there when its at the destination?
I don't think he meant picking where it lays. More like, laying the bomb, and then it starts to move.

I could be wrong, that's just what I interpretted from his post.
Reply With Quote
  #5  
Old 02-16-2003, 09:01 AM
PrinceDark PrinceDark is offline
Criminal X
PrinceDark's Avatar
Join Date: Feb 2003
Location: Miami, Florida
Posts: 662
PrinceDark will become famous soon enough
My goal was moving it after the player layed the bomb down. I'll figure out another way to do it.
Thanks for the help.
__________________
- Criminal X: certified nut case
Reply With Quote
  #6  
Old 02-16-2003, 06:30 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Toran, you dont understand, the bomb LOOKS like it is moveing when you use showimg, its just not really a bomb anymore.

1. Add the x,y, and power to an array and remove bombs that arent at their destination.
2. use a for-loop to show the bombs at their x,y, with an image based on their power
3. add to their x and y every so often to move them.
4. when they get to their destination, use putbomb, and remove the data from the array.
__________________

subliminal message: 1+1=3
Reply With Quote
  #7  
Old 02-16-2003, 08:33 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by Falcor
Toran, you dont understand, the bomb LOOKS like it is moveing when you use showimg, its just not really a bomb anymore.

1. Add the x,y, and power to an array and remove bombs that arent at their destination.
2. use a for-loop to show the bombs at their x,y, with an image based on their power
3. add to their x and y every so often to move them.
4. when they get to their destination, use putbomb, and remove the data from the array.
Hey, yeah, I do understand actually. But I don't see the point when you could code your own bomb NPC and add a lot of improvments to that, compared to a measily showimg eye-trick.

Just making a new bomb NPC seems a lot easier.
Reply With Quote
  #8  
Old 02-17-2003, 04:47 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by Torankusu

Hey, yeah, I do understand actually. But I don't see the point when you could code your own bomb NPC and add a lot of improvments to that, compared to a measily showimg eye-trick.

Just making a new bomb NPC seems a lot easier.
Maybe, Maybe not, it all depends on situation... This meathod would work for all bombs. the other meathod, the bombs would have this code in them, useless code that would only be usefull under this one circumstance.
__________________

subliminal message: 1+1=3
Reply With Quote
  #9  
Old 02-17-2003, 05:39 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Toran, all the kid wants is some eye candy in the first place. Why make it harder than it has to be? He wants a bomb to move from a to b. No need for an entirely new script for it.
__________________
[signature]insert here[/signature]
Reply With Quote
  #10  
Old 02-17-2003, 06:05 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by screen_name
Toran, all the kid wants is some eye candy in the first place. Why make it harder than it has to be? He wants a bomb to move from a to b. No need for an entirely new script for it.
I figured a customizable bomb would be more fun.
Reply With Quote
  #11  
Old 02-17-2003, 10:10 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Just change the bomb npcw for that quest only, then change it back.
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #12  
Old 02-19-2003, 09:30 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by Torankusu
I figured a customizable bomb would be more fun.
So you all of a sudden changed your reasoning why he should use a custom bomb?
__________________
[signature]insert here[/signature]
Reply With Quote
  #13  
Old 02-19-2003, 02:52 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by screen_name


So you all of a sudden changed your reasoning why he should use a custom bomb?
...Or I gave him another reason why.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:08 PM.


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