creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Agent does not inject   
Horstj

Horstj
Germany  


  10/16/2011

I have been working on a stasis pod. When it is done creatures inside it will be frozen, meaning they dont age, die, starve, have needs (well, that's what a stasispod is for) and make it stop count agains population limit. But first I have to make it inject, that's the part that doesn't work. I do not get any errormessages.
The Sprites are 176*201
And the code is here:

new: vhcl 1 1 10854 "Stasispod" 40 0 600
attr 206
bhvr 8
clac 0
elas 0
seta ov16 null
setv ov80 0
setv ov00 0
mvsf 1760 3577
cabn 30 25 145 175
cabp 0
pat: dull 1 "Stasispod" 3 0 0 103
pat: dull 2 "Stasispod" 21 0 0 102
pat: dull 3 "Stasispod" 32 0 0 101

scrp 1 1 10854 1
lock
doif ov00 = 0
clac -1
part 3
snde "pod1"
anim [0 1 2 3 4 5 6]
part 1
anim [0 1 2 3 4 5 6 7]
over
part 0
anim [0 1 0 1 2]
over
dpas 4 0 0
seta ov16 null
seta va16 null
snde "stm1"
part 1
anim [8 9 10 11 12 13 14 15 16 17]
part 2
anim [0 1 2 3 4 5 6 7 8 9 10]
setv ov00 1
clac 0
attr 12
prt: send 0 255
*put un-freeze script here
doif ov17 ne null
targ ov17
paus 0
zomb 0
endi
else
clac -1
part 1
snde "stm1"
gpas 4 0 0 0
anim [17 16 15 14 13 12 11 10 9 8]
part 2
anim [10 9 8 7 6 5 4 3 2 1 0]
over
part 0
anim [2 1 0 1 0]
over
seta va16 null
inst
setv va19 0
seta va17 null
epas 4 0 0
doif targ <> null
addv va19 1
doif va19 = 1
seta va16 targ
seta va17 held
doif va17 <> null
targ va17
mesg writ targ 5
endi
elif va19 > 1
rpas ownr targ
endi
endi
next
slow
inst
epas 0 0 0
doif fmly <> 4
rpas ownr targ
endi
next
slow
targ ownr
part 3
snde "pod1"
anim [6 5 4 3 2 1 0]
part 1
anim [7 6 5 4 3 2 1 0]
setv ov00 0
clac 0
attr 4
prt: send 0 255
*put freeze script here
dpas 1 0 0
dpas 2 0 0
dpas 3 0 0
*get creature
doif held ne null
seta ov17 held
targ ov17
zomb 1
pose 62
dirn 1
chem 152 255
paus 1
endi
endi
endm

scrp 1 1 10854 3
targ from
doif fmly = 4 and gnus = 2
prt: bang rand 60 100
endi
stim writ targ 92 1
endm


scrp 1 1 10854 125
doif ov00 = 0
clac -1
part 3
snde "pod1"
anim [0 1 2 3 4 5 6]
part 1
anim [0 1 2 3 4 5 6 7]
over
part 0
anim [0 1 0 1 2]
over
dpas 4 0 0
seta ov16 null
seta va16 null
snde "stm1"
part 1
anim [8 9 10 11 12 13 14 15 16 17]
part 2
anim [0 1 2 3 4 5 6 7 8 9 10]
setv ov00 1
clac 0
attr 12
prt: send 0 255
endi
endm

 
AquaShee

AquaShee



  10/16/2011

So nothing happens when you inject? Did you turn off autokill?

The Community Scribble: make (y)our own metaroom!
 
Horstj

Horstj



  10/17/2011

I tried to turn off autokill, but it still yust says "Agent injected" but I cannot find it. No error message, nothing. i tried ject 7 too, it just said "OK".
 
ylukyun
Patient Pirate

ylukyun

Manager



  10/17/2011

And you've looked over the whole metaroom making sure that the agent was not anywhere? I tried mvsf 1760 3577 on some objects and they ended up quite far away from those coordinates. Mvsf makes sure the location is valid and I think it might alter it if it isn't.

Other than that, I can't think of anything. I don't know how to make multi-part agents, so if it is a problem with parts I wouldn't be able to tell.

Are you using the CAOS tool? It can sometimes help with simpler problems.

 
Papriko
Peppery One

Papriko



  10/17/2011

new: vhcl 1 1 10854 "Stasispod" 40 0 600
attr 206
bhvr 8
clac 0
elas 0
seta ov16 null
setv ov80 0
setv ov00 0
mvsf 1760 3577
cmrt 0
cabn 30 25 145 175
cabp 0
pat: dull 1 "Stasispod" 3 0 0 103
pat: dull 2 "Stasispod" 21 0 0 102
pat: dull 3 "Stasispod" 32 0 0 101
Try to insert the line in bold you can see above. When your agent really injects, this should center your camera on it. Maybe so you can find out where it ends up.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Horstj

Horstj



  10/17/2011

I found it! Now I know why it didn't inject in the intended place: it is tooo large. so now I'm going to redo the sprites. Now to the next problem: when I click it (script 1 1 10854 1) it gets killed aaannd it's because I removed the ports but not the scriptparts calling them. Or rather not only, I also get this:

Incompatible type: decimal expected
... 00 1 clac 0 attr 12 {@}doif ov17 ne null targ ov17 pa ...


I think I have used ATTR in a wrong way, but I have no idea how it would be right.

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  10/17/2011

it's about your DOIF statement, not the ATTR--check the position of the {@}. I don't think it likes the OV17 variable.

I've had similar problems in the past when using variables to refer to other agents.

Before you try to modify a variable, it has a default numeric value of zero (0), rather than being a true "blank slate". So if that variable has not already been set to "null" by hand before the script checks it, you can run into problems where it comes back as the wrong 'type' of variable (hence "incompatible type" ), because it still has that default value of "0" and doesn't realize you want it to be "null" instead ("decimal expected" ).

So, try specifying "seta ov17 null" when you first create the stasis pod, I've a hunch that will probably fix it.



 
Horstj

Horstj



  10/18/2011

It fixed it! Thanks a lot!
Now I only have to rework the ATTR comands (the pod should be moveable so 12 or 4 are wrong, it must be something containing 2) and the sprites.

I think it won't take long untill I can release it. :)

Edit: Does anyone know how high the average room in C3 is? (in pixels) Or rather how high an agent may be to fit into?

 
Horstj

Horstj



  10/29/2011

ATTR fixed! Sprites fixed!
And the cabin is still large enough, now, does anyone know a way to make a creature not count towards the population limit? (I want to make it so that frozen creatures don't count (aka if your limit is 6 creatures and you have 6 creatures and than you freeze 1 you have one free "slot" again; like your limit was 7 or you where having only 5 creatures)

 
Papriko
Peppery One

Papriko



  10/29/2011

Umm, not sure, but I think you had to modify the breeding script cos. There is the evaluation of the breed limit done.
I personally don't like to modify default scripts like that, but otherwise you had to do complicated tricks I guess...


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Horstj

Horstj



  10/29/2011

What about using DEAD (after PAUSing the creature of course)? I would only need a way to make them alive again...
 
AquaShee

AquaShee



  10/29/2011

Why not just up the breeding limit by 1 for each norn that is in statis? You can lower it again when you thaw them out.

The Community Scribble: make (y)our own metaroom!
 
Papriko
Peppery One

Papriko



  10/29/2011

Then you'd need some routines making sure the agent does not set the limit to 0 or something negative because the player changed it in the meantime by hand.

And Horstj, I'd not recommend that. As in real life, you can not beat the death. When a creature is dead then it is dead.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Horstj

Horstj



  10/30/2011

Changeging the breeding limit at C3 is quite simple using
setv game "c3_max_creatures" # rgam

and
setv game "c3_max_norns" # rgam

but I'm not sure if that works in DS too. And if it does not work (that's what I expect), I have no idea how to do it. I had a look at the "ds gui - options.cos" but I don't understand how it works...

 
Papriko
Peppery One

Papriko



  10/30/2011

Have a look at the !DS_game variables.cos

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Horstj

Horstj



  10/31/2011

does anyone know what this means:

Incompatible type: decimal expected
... 0 addv va01 1 next {@}doif game "multivend_info_game ...


if you need more information, I can post the compleat cos-file.

Edit: I'm extremly stupid! I should have seen it, but I haen't: The script ties to use "multivend_info_gamename" but it is a test so I used "multivend_test_gamename" but didn't change it everywhere. As a result I got an error.

 
Horstj

Horstj



  11/1/2011

So the !DS_game variables.cos sais that total_population and breed_limit are used for population limit. But modifiing them doesn't seem to be possible. But since there is no autokill or errorreport, I think they get instantly set back to the values set in the options gui.
That means: if you have the maximum of allowed creatures you can freeze them but not unfreeze them and freezing a creature does not create free space for a new one.

 
Papriko
Peppery One

Papriko



  11/1/2011

Did you also use RGAM to apply the changes?

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Horstj

Horstj



  11/1/2011

Yes, I'm using RGAM to apply changes. That is not the problem...

Edit: it seems t work just fine in C3.

Edit 2: or not... Damn it! I think I'll have to abstain on this feature :( Well, at lest the freezing stuff works.

 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki