Page 1 of 1

Weapon question

Posted: Fri Feb 19, 2010 1:44 pm
by planebus

Code: Select all

;
; Pawn.ini
;
; defintion of all pawns goes here
;

;conversation defines

[Conversation]
background = conva4.bmp
backgroundalpha = a_conva4.bmp
iconx = 0
icony = 0
speachx = 22
speachy = 20
speachwidth = 730
speachheight = 155
speachfont = 10
replyx = 22
replyy = 20
replywidth = 730
replyheight = 155
replyfont = 10
replymenufont = 10
replymenubar = menuconv.bmp
replymenubaralpha = a_menuconv.bmp
replybackground = conva4.bmp
replybackgroundalpha = a_conva4.bmp
speachwindowx = 10
speachwindowy = 10
replywindowx = 10
replywindowy = 440
giffile1 = menu\arrow.gif
;giffile2 = 
;giffile3 = 
;giffile4 = 
;giffile5 = 
;giffile6 = 
;giffile7 = 
;giffile8 = 
;giffile9 = 
gifx = 10
gify = 10 

[camera]
actorname = Projectile\proj.act
actorrotation = 0 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = false
boundingboxanimation = nocollide
shadowsize = 0

[Virgil]
actorname = Virgil_red.act
actorrotation = -90 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = Idle
shadowsize = 30

[robot]
actorname = robot.act
actorrotation = 0 90 0
actorscale = 1.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = idle

===
; pawn weapons
;===

[M16_bot]
[b]actorname = m16_bot.act
actorrotation = 0 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
type = weapon
environmentmapping = false
allmaterial = false 
percentmapping = 75
percentmaterial = 75[/b]
when I add those Bold characters, namely defind a weapon in pawn.ini file,
I run the game, it pop up a message box
"RealityFactory has stopped working
A problem caused the programm.....
"
How do I handle this problems
Thx

Re: Weapon question

Posted: Fri Feb 19, 2010 1:45 pm
by planebus
this word is added at the end of files

[M16_bot]
actorname = m16_bot.act
actorrotation = 0 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
type = weapon
environmentmapping = false
allmaterial = false
percentmapping = 75
percentmaterial = 75

Re: Weapon question

Posted: Fri Feb 19, 2010 2:32 pm
by QuestOfDreams
Make sure that there are some empty lines at the end of your ini file.

Re: Weapon question

Posted: Fri Feb 19, 2010 4:27 pm
by planebus
Yes, I am sure there are some emply line at the end of file

Weapon

Posted: Sat Feb 20, 2010 10:48 am
by planebus
friends, I am exhausted about this question.
I added a weapon which denoted by Bold letters, since I run the game, it will pop up a error mesage box
" RealityFactory has stopped working A problem caused the programm....."
Can anyone show me the way,
BTY, can anyone who has some guide about RF can share with me,
Thanks

my pawn.ini file
;
; Pawn.ini
;
; defintion of all pawns goes here
;

;conversation defines

[Conversation]
background = conva4.bmp
backgroundalpha = a_conva4.bmp
iconx = 0
icony = 0
speachx = 22
speachy = 20
speachwidth = 730
speachheight = 155
speachfont = 10
replyx = 22
replyy = 20
replywidth = 730
replyheight = 155
replyfont = 10
replymenufont = 10
replymenubar = menuconv.bmp
replymenubaralpha = a_menuconv.bmp
replybackground = conva4.bmp
replybackgroundalpha = a_conva4.bmp
speachwindowx = 10
speachwindowy = 10
replywindowx = 10
replywindowy = 440
giffile1 = menu\arrow.gif
;giffile2 =
;giffile3 =
;giffile4 =
;giffile5 =
;giffile6 =
;giffile7 =
;giffile8 =
;giffile9 =
gifx = 10
gify = 10

[camera]
actorname = Projectile\proj.act
actorrotation = 0 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = false
boundingboxanimation = nocollide
shadowsize = 0


[robot]
actorname = robot.act
actorrotation = 0 90 0
actorscale = 1.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = idle

[Virgil]
actorname = Virgil_red.act
actorrotation = -90 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = Idle
shadowsize = 30

[v_minigun]
actorname = v_minigun.act
actorrotation = 0 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
type = weapon
environmentmapping = true
allmaterial = true
percentmapping = 75
percentmaterial = 75

Re: Weapon question

Posted: Sat Feb 20, 2010 6:05 pm
by QuestOfDreams
Is there any error message in the RealityFactory log file?
The v_minigun.act file is usually located in the subdirectory "Weapon" which you did not specify.
Also, v_minigun.act is a 1st person weapon actor - you should use p_minigun.act if you want to attach it to Virgil.
BTY, can anyone who has some guide about RF can share with me
What kind of guide do you need? There's a complete manual that comes with RF and you can download an ebook that walks you through the process of creating a whole game with RF ...

PS: Don't create more than one topic for the same question. This goes against the board posting rules.

Re: Weapon question

Posted: Sun Feb 21, 2010 9:19 am
by planebus
thanks with millions^_^

So I modify our pawn.ini to add a weapon with the following lines, and there is no error message box pop up again
[p_minigun]
actorname = Weapon\p_minigun.act
actorrotation = 0 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
type = weapon
environmentmapping = true
allmaterial = true
percentmapping = 75
percentmaterial = 75

In my script, I also write down those codes to setweapon, but my Virgil does not still hold the gun, so what should I do?
Spawn[ ()
{
Console(true);
SetWeapon("p_minigun");
NewOrder("start");
} ]

Re: Weapon question

Posted: Wed Mar 03, 2010 1:06 am
by IndigoWraithe
*edit: i also discovered that the scale number must also be equal to the scale number of your character. many of the actors are scaled to 1.4, so please be sure to have your scale set to the appropriate number.

i suggest you download the ebook and go to the section about adding weapons. It has an in-depth, step-by-step tutorial on how to add a new weapon to your game. i haven't started adding weapons yet, so i can't tell you off the top of my head and I'm not at home right now, so i don't have the file with me. someone posted a link a little further up, or just go to the downloads section and you can find it there.

as i recall, you have to run a new level in reality factory to do weapon positioning, but im not sure.