Author Topic: I son't know why this won't work  (Read 4249 times)

0 Members and 1 Guest are viewing this topic.

Offline Cloudee1

I son't know why this won't work
« on: September 17, 2003, 04:15:37 AM »
ok here is the problem I am having with this

I f you have trap and have not smoked with rat then setting the trap seems to work, if you have smoked with the rat and the try to set trap then it says that the trap is already set.

(if(Said('use,set/trap'))
  (if(not (TRAP_SET))
    (if(send gEgo:has(INV_TRAP))
      Print("You spot a good place to set the trap!")
      (send gEgo:put(INV_TRAP))
      =TRAP_SET TRUE
          (if(not (SMOKE_WITH_RAT))
             (send gGame:changeScore(2))
          )(else (send gGame:changeScore(4)))
    )(else Print("What trap?"))
  )(else Print("You have already set the trap!"))
)

the default for TRAP_SET is false
the default for SMOKE_WITH_RAT is false


Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline robingravel

Re:I son't know why this won't work
« Reply #1 on: September 17, 2003, 08:39:30 AM »
When the ego put the trap on the ground, the trap is not supposed to set up?

Do you wish to see the trap is put on the ground and set up  for later?


Robin Gravel

Offline Eigen

Re:I son't know why this won't work
« Reply #2 on: September 17, 2003, 12:35:16 PM »
Are the TRAP_SET  and  SMOKE_WITH_RAT  global vars? Try compiling all scripts.



-Eigen
Artificial Intelligence Competition

Offline Cloudee1

Re:I son't know why this won't work
« Reply #3 on: September 17, 2003, 02:10:26 PM »
well yes robin actually when it is done i hope to have the trap set up so that you can see it but for now I'm just trying to get this part to function before I add more steps to it.

Eigen those are both global variables and I compile and rebuild ALL of the time.  I recompiled each script and the same scenario happens.

so uhm does this piece of script seem to be ok then?

... Later On ...

So I think this bit was ok I was working on the script in another room where I had some sloppy script, and now everything seems to work , but it didn't have anything to do with the trap's condition, but who am I to complain, maybe recompiling helped after all?

So Robin back to that placing trap thing i just figured I'd make the TRAP_SET global variable into a number 0-4 because there's 4 possible rooms to place the trap in, then if you set it in the living room say = TRAP_SET 2. then in the init part for the living room I'd hide a view of the trap, unless it's set in room 2 then I'd show it. ...does that sound about right?
« Last Edit: September 17, 2003, 04:01:42 PM by cloudee1 »
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline robingravel

Re:I son't know why this won't work
« Reply #4 on: September 17, 2003, 04:23:05 PM »
Hmmm.

I"m wondering if there is a command obj.in.room("banana",v0) like in SCI?

Robin Gravel
« Last Edit: September 17, 2003, 04:26:43 PM by Robin_Gravel »

Offline Cloudee1

Re:I son't know why this won't work
« Reply #5 on: September 17, 2003, 04:57:17 PM »
I have no idea what you just said ::)
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline robingravel

Re:I son't know why this won't work
« Reply #6 on: September 17, 2003, 05:46:51 PM »
obj.in.room("banana",v0) is one of AGI commands.

It tells the program the obect banana is in the current room.
v100=15
If (obj.in.room("banana",v100)) {
 print"blahblahblah"
}

If the banana is in the room 15, then....

You know, I made many AGI games like Naturette, Serguei's destiny. Other AGI games are in developement.


Robin Gravel

Offline Cloudee1

Re:I don't know why this won't work
« Reply #7 on: September 17, 2003, 05:51:22 PM »
Yeah I've come straight into sci.

Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.057 seconds with 21 queries.